Hi All,
I am working on one macro. And I am stucked in between, I need to highlight entire row for the values "Yes" in column R and Column S till the end of the columns.
I am using below code to do the same but somehow only one row gets highlighted and all others row don't highlight. Also It doesn't highlight any row for Column S
Could anyone please help me to correct this code.
I have also attached the file to check the macro.
Sub highlightfinal()
Dim cell As Range
Range(Range("R1"), Range("R1").End(xlDown)).Select
For Each cell In Selection
If cell = "Yes" Then cell.EntireRow.Interior.ColorIndex = 4
Next cell
Range(Range("S1"), Range("S1").End(xlDown)).Select
For Each cell In Selection
If cell = "Yes" Then cell.EntireRow.Interior.ColorIndex = 3
Next cell
End Sub
Thank you in advance
Bookmarks