Is there a quick way to...

U

Utkarsh

Something like this should do:

Sub banding()
ActiveSheet.Range("A65536").Select
Selection.End(xlUp).Select
lastrow = ActiveCell.Row
Range("A6:AK" & lastrow).Select
Selection.Interior.ColorIndex = xlNone

'Change rownum to the the first row number where data occurs

rownum = 6
For i = 1 To (lastrow - rownum) Step 2
Range("B" & rownum + i & ":AK" & rownum + i).Select
With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
Next i
End Sub
 
R

Ruffed Grouse

Try highlighting the entire sheet, and using conditional formatting,
make Canodition1 be "Formula Is" =EVEN(ROW(A1))=ROW(A1), and set the
formatting to highlight the background.
 
G

Gord Dibben

You can do this using Conditional Formatting.

Select a range of rows.

Format>CF>Formula is:

For colored even rows enter =MOD(ROW()+1,2)=1

For colored odd rows enter =MOD(ROW(),2)=1


Gord Dibben Excel MVP
 
Top