I am trying to add color (and eventually a border) to my subtotal rows. I tried conditional formatting but it colors the entire row. My data is only in colums A through AA.
I think there is something wrong with the way I select the range but I can't figure this out.
I have nested subtotals that total on columns C and A which might be causing problems as well.
Dim LastRow As Long
Dim i As Long
Application.ScreenUpdating = False
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = 2 To LastRow
If Range("A" And i) = "Subtotal" Then
Range("A" And i).Interior.ColorIndex = 36
Application.ScreenUpdating = True