Creating macros in Excel

  • Thread starter Thread starter ZhenyaVirina
  • Start date Start date
Z

ZhenyaVirina

I need help with creating a function within excel worksheet. Which
will look for a keyword "Summary" and if it will find it then I would
like to highlight the entire row with green color.

Thank you
 
Sub virina()
Set r = ActiveSheet.UsedRange
For Each rr In r
If InStr(rr.Value, "Summary") <> 0 Then
rr.EntireRow.Interior.ColorIndex = 10
End If
Next
End Sub
 
Back
Top