I am trying to highlight an entire row if the cell in Column A contains the text Total starting from row 5.
Any help anyone can give me, I would greatly appreciate.
Here is my current code:
Dim rng As Range
Dim c As Range
Dim endrow As Long
Dim endcol As Long
endrow = Range("A" & Rows.Count).End(xlUp).Row
endcol = Range("IV3").End(xlToLeft).Column
Set rng = Range(Cells(4, 1), Cells(endrow, endcol))
For i = 4 To endrow
If Range("A" & i).Value = "*Total*" Then
Rows(i).Select
Selection.Interior.Color = RGB(192, 192, 192)
End If
Next i
Any help anyone can give me, I would greatly appreciate.
Here is my current code:
Dim rng As Range
Dim c As Range
Dim endrow As Long
Dim endcol As Long
endrow = Range("A" & Rows.Count).End(xlUp).Row
endcol = Range("IV3").End(xlToLeft).Column
Set rng = Range(Cells(4, 1), Cells(endrow, endcol))
For i = 4 To endrow
If Range("A" & i).Value = "*Total*" Then
Rows(i).Select
Selection.Interior.Color = RGB(192, 192, 192)
End If
Next i