Hey Team,
I have this code that highlights the entire row of the active cell. But I don't want it to mess with the cells I already have highlighted in that row.
Is there a way to modify this to only highlight cells that are not currently highlighted?? This way my highlighted cells are not affected?
Thanks,
I have this code that highlights the entire row of the active cell. But I don't want it to mess with the cells I already have highlighted in that row.
Is there a way to modify this to only highlight cells that are not currently highlighted?? This way my highlighted cells are not affected?
Thanks,
VBA Code:
Dim i As Long
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If i > 3 Then
Rows(i).EntireRow.Interior.ColorIndex = 0
End If
i = Target.Row
If i > 3 Then
Rows(i).EntireRow.Interior.Color = RGB(255, 242, 204)
End If
End Sub