I wan to use a macro in excel to color all rows (or a range in a row) that have an even number in column B.
The script below does what I want except that it only colors a single cell, not the whole row (or a range in a row).
Dim lastRow As Long
lastRow = Range("A1").End(xlDown).Row
For Each Cell In Range("A1:A" & lastRow) ''change range accordingly
If Cell.Value Mod 2 = 1 Then ''highlights row 2,4,6 etc|= 0 highlights 1,3,5
Cell.Interior.ColorIndex = 15 ''color to preference
Cell.Interior.ColorIndex = xlNone ''color to preference or remove