How to Highlight Every Other Row in Excel
In this article
Highlighting every other row in Excel (also called banded rows or zebra striping) makes large spreadsheets easier to read and scan. You can do it in under a minute using Excel's built-in table styles, or with a simple conditional formatting formula if you need more control. The table style method is the fastest, while the conditional formatting method works on any range and keeps the banding even if you add or remove rows.
What You'll Need
- Microsoft Excel (2010 or later, including Microsoft 365)
- A spreadsheet with data in a contiguous range (no completely empty rows or columns in the middle)
- Basic familiarity with selecting cells and opening dialog boxes
Step-by-Step
Method 1: Use a Table Style (Easiest)
- Select any cell inside your data range.
- Press Ctrl+T (or Cmd+T on Mac). Excel will show a dialog asking if your data has headers. Check the box if your first row contains column titles, then click OK.
- Your data is now a formatted table. If the banding isn't already visible, click anywhere inside the table to reveal the Table Design tab (called Table on some versions) in the ribbon.
- In the Table Styles group, look for a style that has a checkered pattern (usually the first several options). Click one, like Light Blue, Table Style Light 2. The rows will alternate shading.
- To turn off the banding later, select the table, go to Table Design, and uncheck Banded Rows in the Table Style Options group.
Method 2: Use Conditional Formatting (More Flexible)
- Select the range you want to format. For example, if your data is in A1:F20, click A1, hold Shift, and click F20. Include the header row if you want it formatted too, or start from the first data row.
- Go to the Home tab, click Conditional Formatting in the Styles group, and choose New Rule.
- In the New Formatting Rule dialog, select Use a formula to determine which cells to format.
- In the formula box, enter:
=MOD(ROW(),2)=0— this highlights even-numbered rows. If you want odd rows highlighted instead, use=MOD(ROW(),2)=1. - Click the Format button, go to the Fill tab, pick a light color (like a pale blue or gray), and click OK.
- Click OK again to apply the rule. Your selected rows will now alternate.
- If your data starts on a row other than 1 (for example, row 5), the formula will still work, but the pattern may start on the wrong row. To fix this, adjust the formula to
=MOD(ROW()-5,2)=0(replace 5 with your starting row number) so that row 5 is highlighted.
Common Mistakes
- Selecting the wrong range: If you select only the data cells but not the header, the header won't be formatted. If you select extra blank rows, the banding will appear on empty rows.
- Using absolute row references in the formula: The formula must use
ROW()without any cell reference (like$A$1). UsingROW(A1)will work too, but it's easier to just useROW(). - Applying the rule to a single cell instead of a range: If you select only one cell before creating the rule, the formatting will only apply to that one cell. Always select the full range first.
- Forgetting to remove existing fills: If your cells already have a fill color, the conditional formatting rule may not show up because the existing fill takes precedence. Clear any manual fills first.
Tips
- Use a very light fill color (like light gray or light blue) so the text remains readable. Dark colors can make text hard to see.
- If you want to band by groups (e.g., every time a value in a column changes), use a more advanced formula like
=MOD(SUBTOTAL(3,$A$2:$A2),2)=0— but that's beyond the basic every-other-row pattern. - To remove the conditional formatting later, select the range, go to Conditional Formatting > Clear Rules > Clear Rules from Selected Cells.
- If you use the table method, the banding will automatically extend when you add new rows to the table. With conditional formatting, you need to update the range if you add rows outside the original selection.
- Keyboard shortcut for conditional formatting: After selecting the range, press Alt+H+L+N to open the New Formatting Rule dialog directly.
Troubleshooting
If the banding doesn't appear
- Check that the range is correct: Click any cell in the formatted range and look at the Name Box (top left) to see the range. If it's wrong, re-select the correct range and reapply the rule.
- Check the formula: Go to Conditional Formatting > Manage Rules. Make sure the rule is listed, the range is correct, and the formula has no typos. The formula should start with an equals sign.
- Check for conflicting rules: In the Manage Rules dialog, if there are multiple rules, the order matters. Select the rule and use the up arrow to move it higher if needed. Also check the Stop If True checkbox — if it's checked on another rule, that rule may prevent yours from applying.
- Check cell fill: If cells have a manual fill, that overrides conditional formatting. Select the range, go to Home > Fill Color and choose No Fill.
- Check worksheet zoom: Sometimes banding is subtle. Zoom in to see if the shading is actually there but very light.
If the banding starts on the wrong row
If your data starts on row 5 and you want row 5 to be highlighted, but row 6 is highlighted instead, adjust the formula to =MOD(ROW()-5,2)=0. Replace 5 with your actual starting row number.
If the table style doesn't show banding
Make sure you have selected a table style that actually has banding. Some styles are plain. Look for styles with a checkered pattern in the preview. Also, check that Banded Rows is checked in Table Design > Table Style Options.
Frequently Asked Questions
Can I highlight every other row without using a formula?
Yes, the table style method (Method 1) does it without any formulas. Just convert your data to a table and pick a banded style.
Will the banding stay if I sort or filter the data?
Yes, both methods keep the banding based on the row's position in the range, not the original data order. Sorting or filtering will not break the alternating pattern.
Can I highlight every other row based on a column's value, like only rows where the status is "Active"?
Yes, but that's a different conditional formatting rule. You would use a formula like =$A1="Active" to highlight rows where column A equals "Active". That's not the same as every-other-row, but it's possible.
How do I remove the banding after applying it?
For tables: select the table, go to Table Design, and uncheck Banded Rows. For conditional formatting: select the range, go to Conditional Formatting > Clear Rules > Clear Rules from Selected Cells.
Does the conditional formatting formula work in Excel for Mac?
Yes, the same formula works in Excel for Mac. The steps are similar—just the ribbon layout is slightly different, but the formula and logic are identical.
Can I highlight every other row in Excel Online (web version)?
Yes, both methods work in Excel for the web. The table style method is the same. For conditional formatting, go to Home > Conditional Formatting and follow the same steps.