I have tried to write code that where Grand Total appears in Col A, then to fill Color the Cols A:C in the samerow as where Grand total appears
I get an error and the following code is highlighted
it would be appreciated if someone could assist me
See full code below
I get an error and the following code is highlighted
Code:
Range("A" & r & ":C").Interior.Color = 65535
it would be appreciated if someone could assist me
See full code below
Code:
Sub Colour_GrandTotal()
Sheets("Pivot Table").Select
Dim lr As Long, r As Long
Dim GTRng As Range
lr = Cells(Rows.Count, "A").End(xlUp).Row
Set GTRng = Columns(1).Find(what:="Grand Total", lookat:=xlWhole)
If Not GTRng Is Nothing Then
r = GTRng.Row
If lr >= r Then
Range("A" & r & ":C").Interior.Color = 65535
End If
End If
End Sub