Microsoft Excel: How To Alternate the Color Between Rows



Sometimes you need to make large spreadsheets easier to read. Alternating colors between rows is an excellent way to do it. Here’s how.
Sometimes you need to make large spreadsheets easier to read. Alternating colors between rows is an excellent way to do it. Here’s how.
Alternate Color Between Excel Rows
In Excel, assigning an alternating color scheme to rows is known as color banding.
Start by selecting the cells you want to apply color banding too. Or press Ctrl+A to select the entire sheet.
Next, select the Home tab on the Ribbon, select Styles, and click Conditional Formatting.
A drop-down menu will display; click New Rule.
The New Formatting Rule dialog appears. Click the bottom option labeled Use a Formula to Determine Which Cells to Format.
In the empty format value field, copy and paste in the following formula:
=MOD(ROW()/2,1)>0
The New Formatting Rule window will look like this. Click Format.
Pick a fill color and click OK.
The New Formatting Rule windows will display the color Preview. Click OK.
The section of your spreadsheet will now be color-banded.
If you want to change the color or add more cells, highlight the cells on the spreadsheet. Then on the Ribbon, go to Conditional Formatting > > Manage Rules.
The Conditional Formatting Rules Manager window comes up. Click Edit Rule.
The Edit Formatting Screen appears and can adjust accordingly.
15 Comments
Leave a Reply
Leave a Reply

Dave
There is an obvious typo in two places where the number 9 is inserted in place of the left parent (shift 9). Who hasn’t done that!
I question the formula. Use =mod(row()/2)>0. It works equally well and is less convoluted.
ChuckZilla
I used your formula and it didn’t work.
Dave
Oops, should be =mod(row(),2)>0
Peter Devos
both formulas
=mod(row(),2)>0
=mod(row()/2,1)>0
are giving error message in MS office Pro 2010 ?????
James M Singleton
I have been looking for a Windows application to automatically do it like an Excel addon.
Michael
Why not use the Format as Table button beside it to do it automaticaly, then turn the header off and select your banding style on the Design tab that appears?
Avinash Arora
I was thinking the same thing…there are much easier ways to do this, however conditional formatting is an amazing tool everyone using excel for presentation data should learn. Makes accounting and notable figures much more easy to find and work with.
Peter Devos
Here is the correct formula ( separator is instead of )!
=MOD(ROW()/2;1)>0
nury
thank you i just tried it and it worked thanx again
Steve Krause
NP Nury – it’s a great trick I agree.
Free Unlimited Internet
This really helped me a lot. I struggled with this for 1 hr could you be leave it.
Techno Sage
Very nice tip!
don
way too complex, =iseven(row()) or =isodd(row())
does the same thing
Scott
Prior to XL2007, ISEVEN and ISODD required loading the Analysis Toolpak.
In the mod formula, the >0 part isn’t necessary. 0 will evaluate to FALSE and any non-zero number will evaluate to TRUE, therefore;
=MOD(ROW(),2)
will suffice.
If you want to start with a blank row, instead of a filled row, just subtract 1 in the formula:
=MOD(ROW(),2)-1
laune
if error occurs
should be a “;” instead of a “,” in the formula between row() & 2….
so. =mod(row();2)=0