Alternating row colors
Shade every other row of a table with a conditional formatting rule, so the stripes stay right when you sort.
In this lesson
ROW()is the row number;MOD(n,2)is the remainder after dividing by 2: 0 on even rows, 1 on odd rows.=MOD(ROW(),2)=0shades even rows,=MOD(ROW(),2)=1odd rows.- A rule shades by position, so sorting never scrambles the stripes.
Try a free lesson first
Why your formula broke when you copied it
Lock a cell with $ so a formula keeps working when you copy it down.
Beginner · 7 min · Free, with no sign-up
Do the free lesson on your computer.
Send yourself the link and open it on a laptop or desktop.
On your computer, go tolearnford.com/go/GX5R
This lesson is in the full Excel course
US$149 once
Tax included. New lessons are added as they're written.
Get the full course, US$14930-day money-back guarantee if you've opened fewer than 10 paid lessons.
- All 217 Excel lessons open today, and every new one as it's written.
- The Roadmap, Skills and all eight paths.
- A cheat sheet for every lesson you finish.
- Skill
- Formatting
- Stage
- Beginner
Where it sits in Formatting
- Number formats: currency, percent, decimals10 min
- Copy formatting with the format painter8 min
- Clear formatting fast9 min
- Alternating row colorsThis lesson10 min
- Custom number formats11 min
- Make a table look professional12 min
The steps
12 steps: 4 explanations, 6 Do this, 2 questions, then Your turn.
Try a free lesson first
Why your formula broke when you copied it
Lock a cell with $ so a formula keeps working when you copy it down.
Beginner · 7 min · Free, with no sign-up
Do the free lesson on your computer.
Send yourself the link and open it on a laptop or desktop.
On your computer, go tolearnford.com/go/GX5R