MOD and Conditional Formatting

eubankjd

New member
Joined
Jul 28, 2014
Messages
2
Reaction score
0
Points
0
I was told in a course that I could use MOD() for Conditional formatting - shading every other row -- but wasn't told how. Can someone please tell me how to do this?
 

bgoree09

New member
Joined
Aug 20, 2013
Messages
179
Reaction score
0
Points
0
Good morning,

Certainly. If you want to shade every other row use:

=MOD(ROW(),2)

You can use similar logic to shade every third row, every other column, etc.

Best of luck,
 

eubankjd

New member
Joined
Jul 28, 2014
Messages
2
Reaction score
0
Points
0
Where do I put the formula and how does it know to shade?
 

bgoree09

New member
Joined
Aug 20, 2013
Messages
179
Reaction score
0
Points
0
Sorry I left off the last of the formula.

It should read:

=MOD(ROW(),2)=1

Go to conditional formatting and select the option to use your own formula. Paste that in and set your formatting.

MOD takes the remainder. This takes the row # divided by two, so even rows will have a remainder of 0, while odd rows will have a remainder of 1. All of the 1's get formatted and all of the 0's are blank.
 
Top