W.E.B

asked on

# Highlight ROW excel VBA

Hello,

can you please help,

I'm trying to highlight the Row based on if cell Contains specific text "RETURN"

Example , cell has this text

** RETURN **RETURN_ETOBICOKE ON

it is not Highlighting the Row.

Sub HighLight_Retrun_cells()

Sheets("Detail").Select

i = 2

For Each c In ActiveSheet.Range("E2:E" & Range("E" & Rows.Count).End(xlUp).Row)

If Cells(i, 5) = "RETURN" Then

Rng = "A" & i & ":" & "O" & i

Range(Rng).Interior.ColorIndex = 6

End If

i = i + 1

Next c

End Sub

Any help is appreciated.

thanks

can you please help,

I'm trying to highlight the Row based on if cell Contains specific text "RETURN"

Example , cell has this text

** RETURN **RETURN_ETOBICOKE ON

it is not Highlighting the Row.

Sub HighLight_Retrun_cells()

Sheets("Detail").Select

i = 2

For Each c In ActiveSheet.Range("E2:E" & Range("E" & Rows.Count).End(xlUp).Row)

If Cells(i, 5) = "RETURN" Then

Rng = "A" & i & ":" & "O" & i

Range(Rng).Interior.ColorI

End If

i = i + 1

Next c

End Sub

Any help is appreciated.

thanks

ASKER CERTIFIED SOLUTION

membership

This solution is only available to members.

To access this solution, you must be a member of Experts Exchange.

ASKER

Thanks

ASKER

thank you.