How to highlight every other row in excel
Tutor 5 (297 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To highlight every other
row in Excel, use conditional formatting with a formula that identifies odd or
even row numbers.
Method 1: Using Conditional Formatting
with Formula
- Select the data
range you want to format
- Go to Home tab
→ Conditional Formatting → New Rule
- Choose
"Use a formula to determine which cells to format"
- Enter the
formula: =MOD(ROW(),2)=0 for even rows or =MOD(ROW(),2)=1 for odd rows
- Click Format
button and choose your preferred fill color
- Click OK to
apply the formatting
Method 2: Using Table Formatting
- Select your
data range
- Press Ctrl+T
(Windows) or Cmd+T (Mac) to create a table
- Check "My
table has headers" box when applicable
- Click OK
- Go to Table
Design tab → Table Styles section
- Select a style
with banded rows
Method 3: Manual Formatting with Format
Painter
- Highlight the
first row you want to format
- Apply your
desired formatting (background color, font, borders)
- Select both the
formatted row and the row below it
- Copy the
selection (Ctrl+C on Windows, Cmd+C on Mac)
- Select the
remaining rows in your data range
- Paste
formatting using Ctrl+Alt+V → Formats (Windows) or Cmd+Option+V → Formats
(Mac)
Understanding the MOD Formula
The MOD function returns the remainder after
division. MOD(ROW(),2) divides the row number by 2 and returns either 0 (even
rows) or 1 (odd rows). This creates an alternating pattern throughout your
selected range.
Customizing Alternating Row Colors
You can modify the appearance by:
- Changing the
fill color in the Format Cells dialog
- Adding borders
to enhance visibility
- Adjusting font
colors for better contrast
- Applying
patterns or gradients instead of solid colors
Removing Alternating Row Formatting
To remove the formatting:
- Select the
formatted range
- Go to Home →
Conditional Formatting → Clear Rules
- Choose
"Clear Rules from Selected Cells"
For table formatting removal:
- Click anywhere
in the table
- Go to the Table
Design tab
- Select
"None" from the Table Styles gallery
- Convert table
back to range using Table Design → Convert to Range
Troubleshooting Common Issues
Formatting not applying correctly: Ensure your formula references match the starting
row of your selection. Adjust ROW() to ROW()-1 or ROW()+1 based on your data's
starting position.
Colors not visible: Check that cell fill colors aren't overridden by existing
formatting. Clear all formatting first using Home → Clear → Clear Formats.
Formatting extends beyond data: Limit the conditional formatting range to only cells
containing data by selecting the exact range before applying the rule.
Related Questions
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 freeze a row in excel
Answers · 1
How to freeze the top three rows in excel
Answers · 1
How to freeze the top two rows in excel
Answers · 1
How to freeze top row excel mac
Answers · 1