I’m a coding newbie. When running the following code i get error message BASIC syntax error. Unexpected symbol: End Sub.
I’m trying make a macro to shade every other row.
Sub altRows
Dim i as integer
for i = 8 to 1001
Range(Cells(i , 1), Cells(i , 4)).Interior.Color = RGB(255, 255, 255)
i=i+1
Range(cells(i , 1), Cells(i , 4)).Interior.Color = RGB(217, 217, 217)
i=i+1
exit for
End sub