Hi all
I have copied & adapted the text of the macro recorder to sort by colour but receive the above error.
The code blows out on SortOn which is the last line of the procedure... so far.
Range("MyRange").Sort Key1:=Range("D" & newRow), SortOn:=xlSortOnCellColor, Order:=xlAscending...
Hi all
I have created seven Named Ranges for use in formulae in following procedures and want to check that none of them is blank. I have tried variations of the following but have bugged out on the If Application.CountBlank line each time.
With Sheets("Parameters")
Range("G7").Name...
Hi all
I’m having trouble with the syntax to refer to a named range in ThisWorkbook when attempting a VLOOKUP from another (newly created, ActiveWorkbook) workbook.
Specifically I receive a Compile Error: object required message on the Set myVLookupResult line.
Any help is much appreciated...
Hi guys
My code throws 1004 runtime error "No cells found" when copying autofilter results. The line immediately before the error as follows, If Range("J1:K" & lastrow).SpecialCells(xlCellTypeVisible).Count > 1 Then
There is no data in this instance, only a header row & I'm puzzled why the...
Hi all
I’m trying to Index/Match multiple criteria to find a variable date in a variable column.
The variables & lookup ranges are defined in named ranges.
My formula is
{=INDEX(AllDates,MATCH(1,(Vehicles=TARGET)*(AllDates=NxtSvc),1),DateCol)}
but throws #N/A, as do the simpler...
Hi all
I have a macro which prints the active sheet in A3 format.
Sub PrintPlan ()
' Setup page to print 17 columns 1 page wide A3 portrait
'
' Keyboard Shortcut: Ctrl+Shift+P
Dim LR As Long
Application.ScreenUpdating = 0
Application.PrintCommunication = False...
Hi all
I would like to find a way to determine the next time an event occurs.
For example, if today is 12/11/2016 and using an initial start date of 13/11/2015 of an event that occurs every 6 weeks, to return 23/11/2016.
I’m trying to avoid a spreadsheet full of dates but will if it’s the...
Hi all
I have created a macro to retrieve data from selected sheets to a summary page in the same workbook. The code is fine but took some time to put together. I'm wondering if is there is a simpler solution. The patterns are easy to follow. Thanks for your help
Mark
Sub SetFormulas()
Const...
Hi all
I have some code I wish to modify for use on a thumb drive to allow for Drive variation depending upon a particular machine’s configuration. For example on one machine it may be E:\etc\etc, on another O:\etc\etc. The code has been working fine when the drive is specified on my home...
Hi all
My report spreadsheet has developed a problem & now has trouble reading some dates, causing a #N/A error. The formula had worked as expected up to this point. Now that I am looking at a date range which includes October it is behaving unusually. Put simply, it worked last week, but not...
Sub ShowCapacity()
Dim ws As Worksheet
Dim lastrow As Long
Dim FX3 As String
FX3 = "=IF(ISNUMBER(SEARCH(""Total"",$B2)),C2,"""")"
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For Each ws In...
Hi all
I'm trying to apply conditional formatting to a subtotal if it's value is greater than another cell's which is identified using Index/Match.
I'm working thru the steps methodically, and have reached the point where I can compare one cell with another. I have tried 5 different methods but...
Hi all
With my spreadsheet, and using the Conditional Formatting tool, I am trying to format times before 7AM & after 7PM to identify them more easily.
I tested my formula in a cell on the sheet to prove it works…
“=IF(OR(TIMEVALUE(B2)<0.291665,TIMEVALUE(B2)>0.791667),1,2)”, and it does...
Hi all
I wish to colour a range of cells in a newly inserted line. I have no trouble inserting the line but my code for identifying the cells is not compatible. The code trips on the ".Interior.Color" line.
.Rows(lRow & myRange).Interior.Color = 9868950
Sub InsertRows_SeparateCranes()...
Hi all
The following code has a problem which I am unable to identify.
Sub IdentifyClashes()
Dim ws As Worksheet
Dim FX2 As String
Dim FX3 As String
Dim lastrow As Long
FX2 = "=IF(AND(C2=C3,A2+J2>A3),""REVIEW"","""")"
FX3 = "=IF(O2=P2,P2,(P2 & O2))"...
Hi all
I would like to open another workbook & retrieve a worksheet equal to a cell value using VBA.
I have two codes which each do part of the job but I’m having trouble stitching them together.
The following code opens the workbook & retrieves the sheet but requires the specific file name...
Hi all
I have a hyperlink which finds today's date in a column of dates that has worked normally till now. =HYPERLINK("#a"&MATCH(TODAY(),A2:A1048576,0),"GO TO TODAY")
Today however, it is finding yesterday!
I'm working from a work computer which is part of a worldwide network, so I expect...
Hi
I am creating a macro enabled workbook with an active x control which is to rearrange a separate spreadsheet downloaded from SAP. Part of the process involves opening a third workbook and importing a sheet named equal to the value of a cell in the second workbook. I am wondering how to refer...
Hi all
In my workbook I am trying to add a row at each data change, in the same column, on three different sheets using:
Sub InsertRowAtChangeInValue()
Dim lRow As Long
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Sheets(Array("Mechanical", "Contractors", "Cranes &...
Hi all
I wish to add a row when data changes in column 13 and colour it red (255), see code below. Any/all hints & help appreciated.
Regards Mark
Sub SubtotalAndFormat()
' SubtotalAndFormat Macro
Dim aCell As Range, bCell As Range
Dim ExitLoop As Boolean
Dim iRow As Integer...
Hi all
I have a list of dates into the future in column A and a list of corresponding week numbers in column B.
I am able to click and go directly to today’s date using
=HYPERLINK("#a"&MATCH(TODAY(),A:A,0),"GO TO TODAY"). I would like to be able to go to the next 'Planning Week' depending...
Hi
I'm trying to convert date format mmm-dd (no year) to any format excel will recognise. I have looked thru the web - many variations explored...but not this one.
Kind regards and thanks for reading,
Mark