[vba]Originally Posted by paddy69
Public Sub ProcessData()
Const TEST_COLUMN As String = "A" '<=== change to suit
Dim i As Long
Dim LastRow As Long
Dim LastCol As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row
For i = 1 To LastRow
LastCol = .Cells(i, .Columns.Count).End(xlToLeft).Column
With .Cells(i, "F").Resize(, LastCol - 5)
.FormatConditions.Delete
.FormatConditions.Add _
Type:=xlExpression, _
Formula1:="=LEFT($A" & i & ",4)=""Rep:"""
.FormatConditions(1).Interior.ColorIndex = 3 'Red
End With
Next i
End With
End Sub
[/vba]