Maybe this is clearer (but the brackets are not needed)
For a = 6 To (LR - 1) Step 1
It loops from 6 to the value in LR less one, in steps of 1. So 6, 7, 8,... LR-1.
LR = ShtSummary.Cells(Rows.Count, 1).End(xlUp).Row
For i = 6 To LR
If ShtSummary.Cells(i, 2) <> ShtSummary.Cells(i, 3) Then
ShtSummary.Cells(i, 4) = "ERROR"
Else
ShtSummary.Cells(i, 4) = "OK"
End If
Next i
You don't need Step in that case because Step 1 is the default.
You use Step when you want for example
For i = 2 to 10 Step 2
gives 2,4,...10
Or loop backwards as when deleting rows
For i = LR to 2 Step -1
LR = ShtSummary.Cells(Rows.Count, 1).End(xlUp).Row
For i = 6 To LR
If ShtSummary.Cells(i, 2) <> ShtSummary.Cells(i, 3) Then
ShtSummary.Cells(i, 4) = "ERROR"
ShtSummary.Cells(i, 4).Interior.ColorIndex = 3
Else
ShtSummary.Cells(i, 4) = "OK"
End If
Next i
Try
Code:LR = ShtSummary.Cells(Rows.Count, 1).End(xlUp).Row For i = 6 To LR If ShtSummary.Cells(i, 2) <> ShtSummary.Cells(i, 3) Then ShtSummary.Cells(i, 4) = "ERROR" ShtSummary.Cells(i, 4).Interior.ColorIndex = 3 Else ShtSummary.Cells(i, 4) = "OK" End If Next i