Alternating row colors

Shade every other row of a table with a conditional formatting rule, so the stripes stay right when you sort.

Beginner · 10 min · 12 steps

In this lesson

  • Select the table without its header, then Format, then Conditional formatting.
  • 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)=0 shades even rows, =MOD(ROW(),2)=1 odd rows.

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/39MP

This lesson is in the full Google Sheets course

US$149 once

Tax included. New lessons are added as they're written.

Get the full course, US$149

30-day money-back guarantee if you've opened fewer than 10 paid lessons.

  • All 215 Google Sheets lessons open today, and every new one as it's written.
  • The Roadmap, Skills and all seven paths.
  • A cheat sheet for every lesson you finish.

Already have the course? Sign in

Skill
Formatting
Stage
Beginner

Where it sits in Formatting 10 lessons

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/39MP