I am trying to use a macro that will highlight columns E and I of the rows that collumn L equals "XXXXXXX." How can I designate the columns to tie into the row?
Sub highlight()
Dim rg As Range, c As Range
Dim firstAddress As String
Set rg = Range("L9", "L5000")
Application.ScreenUpdating = False
With rg
Set c = .Find("XXXXXXX", lookat:=xlWhole, LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Columns.Range("E", "I").Interior.ColorIndex = 4 "ISSUE IS HERE
Set c = .FindNext(c)
If c Is Nothing Then Exit Do
Loop While c.Address <> firstAddress
End If
Application.ScreenUpdating = True
End With
End Sub
Bookmarks