Hi All,
I keep getting an error with the following If statement
I keep getting an error with the following If statement
Code:
Dim lastline As Long
lastline = Cells(Rows.Count, 2).End(xlUp).Row
For i = 2 To lastline
If Cells(i, 1).Value = "R" Then _
Cells(i, 1).Select
Selection.Interior.Color = 192
ElseIf Cells(i, 1).Value = "A" Then _
Cells(i, 1).Select
Selection.Interior.Color = 49407
Else: Cells(i, 1).Select
Selection.Interior.Color = 5296274
End If
Next i