How to alternate row colors in excel
Tutor 5 (70 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To alternate row colors, use the Table
feature or Conditional Formatting
with a formula that identifies even and odd rows. Both methods create banded
rows that improve readability.
Method 1 — Using the Excel Table Feature
Convert data
to a table
1.
Select your data range (include headers).
2.
Press Ctrl+T
(Windows) or Cmd+T (Mac).
3.
Check My table has
headers and click OK.
Apply banded
rows
·
The table applies alternating row colors
automatically.
·
On the Table
Design tab, toggle Banded Rows
to enable/disable.
Customize
table style
·
Open Table
Styles gallery on the Table Design tab.
·
Choose from prebuilt color schemes (light for
printing, dark for screen).
Method 2 — Using Conditional Formatting
Select your
data range
·
Highlight all data cells (exclude headers for
cleaner header formatting).
Open
Conditional Formatting
1.
Go to the Home
tab → Conditional Formatting → New Rule.
2.
Choose Use a
formula to determine which cells to format.
Create
formula-based rule for even rows
·
Formula: =MOD(ROW(),2)=0
·
Click Format
→ Fill → choose your color → OK.
Add rule
for odd rows
·
Repeat with formula =MOD(ROW(),2)=1 and
pick a contrasting color.
Method 3 — Using Format as Table (Quick)
1.
Select the data range.
2.
Home → Format as
Table → pick a gallery style that uses alternating colors.
3.
Confirm the range in the dialog.
Keep
formatting without table functionality
·
Right-click in the table → Table → Convert to Range → Yes.
·
Alternating colors remain, but table behaviors
are removed.
Customizing Alternating Colors
Modify
an existing table style
·
Right-click a style in the gallery → Duplicate → Modify → change First
Row Stripe / Second Row Stripe and
stripe size.
Create
custom conditional patterns
·
Every 3rd row: =MOD(ROW(),3)=0
·
Two-row bands: =MOD(ROW(),4)<=1
·
Exclude header or specific rows: =AND(MOD(ROW(),2)=0,ROW()>1)
Applying to Dynamic Ranges
Format
entire columns
·
Click column headers and apply ROW()-based
conditional formatting so new rows inherit formatting.
Use
OFFSET for expanding ranges
·
Define a dynamic named range with OFFSET,
then reference that name in conditional formatting rules so formatting grows
with data.
Troubleshooting Common Issues
Colors
not showing
·
Ensure conditional rules are enabled and fill is
not No Fill.
·
Clear conflicting manual formats before applying
new rules.
Incorrect
row pattern
·
Adjust for non-row-1 starts: use =MOD(ROW()-1,2)=0
if data starts on row 2 (account for headers).
Performance
with large datasets
·
Avoid applying conditional formatting to entire
sheets (1,048,576 rows).
·
Prefer Tables for >10,000 rows to improve
performance.
Keyboard Shortcuts
Windows
·
Ctrl+T
— Create Table
·
Ctrl+Shift+L
— Toggle Filters
·
Alt+H+L
— Open Conditional Formatting
Mac
·
Cmd+T
— Create Table
·
Cmd+Shift+F
— Toggle Filters
·
Cmd+1
— Format Cells dialog
Best Practices
·
Choose colors with clear contrast (≥30%
brightness difference).
·
Aim for a minimum 3:1 contrast ratio for
accessibility.
·
Test Print
Preview (Ctrl/Cmd+P) — printed colors may differ from screen.
·
Save custom table styles for consistency across
workbooks.
·
Use Center
Across Selection or table banding instead of heavy conditional
formatting for large datasets.
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to add secondary axis in excel
Answers · 1
How to switch columns to rows in excel
Answers · 1
How to subtract on excel
Answers · 1
How to combine two cells of text in excel
Answers · 1