Hello all you lovely helpful people.
I have a sheet with a list of jobs and the date which they need to be dispatched by in column 'M'.
I have been trying to find/make a macro that will insert a blank (but coloured) line before the row which contains 'todays' date. It then needs to insert a coloured line after each date change.
I have found this macro which does the latter. I just need to make a change so that the first line is inserted before todays date, then goes down the list and inserts a line after each date change.
Sub Deli()
Dim LastRow As Long, i As Long
LastRow = Cells(Rows.Count, 13).End(xlUp).Row
For i = LastRow To 2 Step -1
If Int(Range("M" & i).Value) <> Int(Range("D" & i - 1).Value) Then
Range("M" & i).Rows.EntireRow.Insert shift:=xlDown
End If
Next i
End Sub
This macro does however bring up a run-time error '13', Type mismatch.
And I need the inserted rows to be coloured. Can anyone help me modify this? Many thanks in advance.
Bookmarks