Skip to playerSkip to main contentSkip to footer
  • 5/16/2025
Learn how to alternate row colors in Excel conditional formatting. Essentially, how to alternate row color in Excel (highlight every other row)?

Light Yellow Row Colour
1) Select dataset.
2) Home ~ Style ~ Conditional Formatting ~ New Rule...
3) Use a formula to determine which cells to format
4) =MOD(ROW()-2,4)>=2
5) Format
6) Fill tab
7) Select LIGHT YELLOW
8) OK
9) OK

Dark Yellow Row Colour
1) Select dataset.
2) Home ~ Style ~ Conditional Formatting ~ New Rule...
3) Use a formula to determine which cells to format
4) =MOD(ROW()-2,4)+1=2
Color every 2 rows, starting from the 1st group.
=MOD(ROW()-2,4)+1
Transcript
00:00If you make your dataset into a table like this, you can see that it highlights every other row
00:05nicely for you. But what if you want to highlight something like this in a set of three rows,
00:10or maybe four, or maybe five, or maybe six. This is how you do it. First select your dataset like
00:16this. Then after that, go Home, Style, Conditional Formatting, Manage Rule. We'll be adding two rules.
00:22The first one will be for lighter colors, and this is the formula. Then go Format,
00:26make sure you're on Fill. I'm going to choose a light color like that, and click OK. Second rule,
00:31Formula, and there's the formula. Then go Format, Fill tab again, and slightly darker color,
00:37and hit Apply. And now you can see every two rows are highlighted. If you want to do three rows,
00:42these are the formulas. Every three row is highlighted. Every four row, this is the formula.
00:49This is every four row. And for every five and six rows, these are the formulas.

Recommended