Hi all,
I would like to to have a VBA to highlight rows (ex. A2:F2 & V2 if Y2 = "YES").
I found a code but it highlights the entire row.
Unfortunately I am not able to attached *.xlsm file.
I would like to to have a VBA to highlight rows (ex. A2:F2 & V2 if Y2 = "YES").
I found a code but it highlights the entire row.
Code:
Sub highlightROW() Dim cell As Range
Range(Range("Y2"), Range("Y2").End(xlDown)).Select
For Each cell In Selection
If cell = "YES" Then cell.EntireRow.Interior.ColorIndex = 4
Next cell
End Sub
Unfortunately I am not able to attached *.xlsm file.