Hello,
i want to highlight all cells between 2 filled in cells in a Row. I have the following code which works perfect for columns:
Public Sub TEST()
Dim objCell As Range
Dim strAddress As String
Set objCell = Columns(2).Find(What:="XX", _
After:=Cells(Rows.Count, 2), LookIn:=xlFormulas, _
LookAt:=xlWhole)
If Not objCell Is Nothing Then
strAddress = objCell.Address
Set objCell = Columns(2).FindNext(objCell)
If strAddress <> objCell.Address Then _
Range(Range(strAddress), objCell.Offset(0, 0)).Interior.ColorIndex = 5
End If
End Sub
My VBA knowledge is unfortunately not sufficient to rewrite the code, so that instead of column, e.g. row 3 is searched and marked. Can you help me out with this?
Regards,
Max
Bookmarks