How to Add Alternate Colors in Excel (Easy Guide)
In this article
To add alternate colors to rows in Excel, use a table style or conditional formatting: select your data, go to Home > Format as Table and pick a banded style, or use Home > Conditional Formatting > New Rule with a formula such as =MOD(ROW(),2)=0 and apply a fill color. Both methods update automatically when you add or remove rows. This guide walks through each method step by step, plus fixes for common problems.
What You'll Need
- Microsoft Excel for Windows, Mac, or the web (Excel for Microsoft 365, Excel 2021, 2019, or 2016). Menu labels can differ slightly by version, device, or region.
- A worksheet with data arranged in rows and columns.
- No add-ins required; every method below uses built-in Excel features.
Step-by-Step
Method 1: Format as Table (fastest, auto-updating)
- Select any cell inside your data range. If your data has headers, make sure they are in the first row and there are no completely blank rows or columns inside the range.
- On the Home tab, click Format as Table and choose a style with banded rows (the previews with alternating shading).
- In the dialog that appears, confirm the range and tick My table has headers if your first row contains column names. Click OK.
- To change the colors later, click any cell in the table, open the Table Design tab (called Design on some versions), and pick a different style from the gallery.
- To turn banding on or off, in the Table Design tab tick or untick Banded Rows. You can also tick Banded Columns if you want vertical stripes.
New rows typed directly below the table inherit the banding automatically. If you paste data below the table and it does not pick up the style, drag the table's bottom-right resize handle down to include the new rows.
Method 2: Conditional Formatting (works without converting to a table)
- Select the range you want to color, for example A2:D100. Start from the first data row, not the header row, so the pattern lines up correctly.
- Go to Home > Conditional Formatting > New Rule.
- Choose Use a formula to determine which cells to format.
- In the formula box, type
=MOD(ROW(),2)=0to shade even rows, or=MOD(ROW(),2)=1to shade odd rows. - Click Format, open the Fill tab, choose a light color, and click OK twice.
- To add the second color, repeat steps 2–5 with the opposite formula and a different fill color.
This method updates as rows are inserted or deleted within the selected range. If you insert rows outside the range, extend the range via Home > Conditional Formatting > Manage Rules and edit the Applies to box.
Method 3: Manual Fill (static, for small ranges)
- Select the first row you want to color.
- On the Home tab, click the Fill Color paint bucket and choose a color.
- Select the next row, choose a second color, then use Format Painter or copy and paste to repeat the pattern. This does not update automatically, so it suits one-off formatting only.
Common Mistakes
- Including the header row in the conditional formatting range. The formula counts from row 1, so the pattern shifts by one row and the first data row gets the wrong color. Start the range at the first data row.
- Leaving blank rows inside the table range. Format as Table may stop at the blank row, so the banding does not cover all your data. Remove blank rows or select the full range manually before formatting.
- Using manual fill for data that changes. Inserting a row shifts the pattern and you have to repaint it. Use a table or conditional formatting instead.
- Choosing dark fills with dark text. Banding should aid readability; use light tints and keep the font color dark.
- Forgetting that conditional formatting overrides manual fill. If a cell already has a fill color, a conditional format rule will replace it when the condition is true.
Tips
- Use the Banded Rows checkbox in Table Design to toggle stripes without losing the rest of the style.
- For a subtle look, pick fills from the theme colors rather than standard colors; they adapt if you change the workbook theme.
- To stripe every third row instead of every other, use
=MOD(ROW(),3)=0in conditional formatting. - If you need banding based on a value (for example, alternate colors within each department), use a formula like
=MOD(COUNTIF($B$2:$B2,$B2),2)=0where column B holds the group name. - Copy a formatted table to another sheet with Paste Special > Formats if you want the look without the data.
Troubleshooting
- Banding does not appear after Format as Table. Check that Banded Rows is ticked in the Table Design tab, and that the style you chose actually includes banding.
- Colors stop partway down the sheet. The table or conditional formatting range does not cover all rows. Resize the table with its handle, or edit the rule's Applies to range.
- Conditional formatting seems ignored. Open Home > Conditional Formatting > Manage Rules and check the rule order and the Stop If True setting. A rule higher in the list may be overriding yours.
- Pattern is off by one row. Your range starts on an odd row but your formula expects an even one. Either change the formula to
=MOD(ROW(),2)=1or start the range one row later. - Colors disappear after pasting data. Pasting can bring source formatting that overrides the table style. Use Paste Special > Values to keep the banding intact.
- File looks different on another computer. Table styles and theme colors can render differently across Excel versions; check on the target machine before sharing.
Frequently Asked Questions
Can I alternate colors by column instead of row?
Yes. In Format as Table, tick Banded Columns instead of Banded Rows. With conditional formatting, use =MOD(COLUMN(),2)=0.
Does Format as Table work in Excel for the web?
Yes, the core Format as Table and banded rows options are available in Excel for the web, though the style gallery may be smaller than the desktop version.
How do I remove alternate colors?
For a table, click inside it, open Table Design, and choose a plain style or untick Banded Rows. For conditional formatting, go to Home > Conditional Formatting > Clear Rules > Clear Rules from Selected Cells.
Will the colors print?
Yes, provided the fill colors are light enough to print visibly and you have not disabled color printing in your printer settings. Check with Print Preview first.
Can I use alternate colors on a filtered table?
Table banding re-numbers visible rows when you filter, so the stripes stay consistent. Conditional formatting based on ROW() does not renumber after filtering, so stripes may look uneven on filtered views.
Why does my formula-based rule color the header too?
The rule's range includes the header row. Edit the rule and set Applies to to start at the first data row.