WP Workflow Picks
excelconditional formattingspreadsheets

Excel Alternating Row Color: Table Styles and Formula Methods

Learn two official ways to set Excel alternating row color: banded table styles and a MOD or ISEVEN conditional formatting rule, plus columns, groups and fixes.

WP Workflow Picks team · · 5 min read · 7 sources
Churchill Club Top 10 Tech Tech Trends Debate 2013 — I chose Deep Learning / Machine Learning
Photo: jurvetson (CC BY 2.0) via Openverse

To get alternating row colors in Excel, select your data and use Home > Format as Table, which applies banded rows automatically. If you don’t want a table, add a conditional formatting rule with the formula =MOD(ROW(),2)=0 (or =ISEVEN(ROW())) and pick a fill color.

Both methods are documented by Microsoft in Apply shading to alternate rows or columns in a worksheet. Below is how each one works, when to choose it, and how to handle the common snags. Menu names reflect Microsoft’s documentation as of October 2026 and may shift slightly between Excel versions.

Which method should you use?

Table style (Format as Table)Conditional formatting formula
Setup effortA few clicksA few clicks plus one formula
New rows banded automaticallyYes, while it stays a tableYes, within the range the rule covers
Custom colors and patternsLimited to table stylesAny fill, any pattern (groups, columns)
Adds filters and structured referencesYesNo
Works on a plain rangeNo (it creates a table)Yes

In short: use a table if your data is a list you’ll filter, sort and grow. Use a formula rule if you want full control over the colors or need to keep the data as an ordinary range.

Method 1: Banded rows with a table style

This is the quickest route and the one Microsoft recommends first, including in its Excel for Mac article.

  1. Select the range you want to shade. The cells can be empty or contain data.
  2. On Windows, go to Home > Format as Table and pick a style. On a Mac, Microsoft’s steps use Insert > Table, then a style from the Table tab.
  3. If your data has a header row, tick My table has headers and click OK.

Banding is on by default. To control it, click inside the table and use Table Style Options on the Table Design tab (Microsoft notes this tab is simply called Table on Mac):

  • Banded Rows toggles the alternating row shading.
  • Banded Columns shades alternate columns instead of, or as well as, rows.

The big advantage: when you add rows or columns to the table, the alternate shading is applied automatically.

Keeping the colors but dropping the table

If you only wanted the stripes, not the filter arrows, you can convert the table back to a normal range. According to Microsoft’s Convert an Excel table to a range of data:

  1. Click any cell in the table.
  2. On the Table Design tab, in the Tools group, choose Convert to Range (or right-click the table, choose Table > Convert to Range).
  3. Confirm with Yes.

The colored rows stay, but they’re now plain cell formatting. You lose the sort and filter arrows, structured references in formulas turn into regular cell references, and, most importantly for this topic, new rows you add later won’t be banded automatically. If you need stripes on a growing plain range, use Method 2 instead.

Method 2: Conditional formatting with a formula

This approach shades rows based on their row number, so it works on any range and doesn’t turn your data into a table. The steps below follow Microsoft’s article and How-To Geek’s walkthrough.

  1. Select the cells you want to band. To cover the whole sheet, click the Select All triangle in the top-left corner of the grid.
  2. Go to Home > Conditional Formatting > New Rule.
  3. Choose Use a formula to determine which cells to format.
  4. In Format values where this formula is true, enter: =MOD(ROW(),2)=0
  5. Click Format, open the Fill tab, choose a color, and click OK twice.

Every even-numbered row in your selection is now shaded.

How the formula works

ROW() returns the row number of each cell being evaluated. MOD(ROW(),2) divides that number by 2 and returns the remainder: 0 for even rows, 1 for odd rows. The rule formats a cell whenever the formula returns TRUE.

Exceljet offers a slightly more readable equivalent, =ISEVEN(ROW()). Both give the same result. Exceljet notes that ISEVEN and ISODD aren’t available in Excel versions before 2007, which is why the MOD version is still common.

Useful variations

GoalFormula
Shade even rows=MOD(ROW(),2)=0 or =ISEVEN(ROW())
Shade odd rows=MOD(ROW(),2)=1 or =ISODD(ROW())
Shade alternate columns=MOD(COLUMN(),2)=0
Shade groups of 3 rows (data starting in row 5)=ISEVEN(CEILING(ROW()-4,3)/3)

Two colors instead of one. Shading only even rows leaves odd rows white. If you want two distinct colors, add a second rule for odd rows with a different fill, as How-To Geek describes.

Groups of rows. The group formula comes from Exceljet’s Shade alternating groups of n rows. The -4 offsets for data that starts in row 5, and the 3 is the group size. Adjust both for your sheet.

Managing the rule later

To change the color, widen the range, or delete the stripes, go to Home > Conditional Formatting > Manage Rules. Make sure the dropdown at the top shows the right sheet or selection, otherwise the rule may not appear in the list.

Common problems and fixes

The stripes start on the wrong row

The formula looks at the real sheet row number, not the position inside your selection. If your header is in row 1 and data starts in row 2, =ISEVEN(ROW()) shades the first data row. If you’d rather leave the first data row white, switch to the odd-row version. You may also want to exclude the header row from the rule’s range so it keeps its own formatting.

Sorting and inserting rows

Because the rule is recalculated from row numbers, Ablebits points out that conditional-formatting banding stays intact when you sort, insert or delete rows in the covered range. Manual fill colors, by contrast, travel with the cells and quickly get out of order.

Filtering is worth testing on your own data: since the formula reads sheet row numbers, hiding rows can leave two shaded rows next to each other in the visible list.

Excel for the web

Format as Table and its Banded Rows option are the dependable choice in the browser. Microsoft’s support article has stated that you can’t create custom conditional formatting rules for alternate shading in Excel for the web, while third-party formula guides describe the same New Rule steps without separating desktop and web. Because Excel for the web changes often, check whether Use a formula to determine which cells to format appears under Conditional Formatting > New Rule in your browser. If it doesn’t, use a table style.

Quick recap

  • Fastest: Home > Format as Table, then toggle Banded Rows on the Table Design tab.
  • Most flexible: Home > Conditional Formatting > New Rule > formula =MOD(ROW(),2)=0, then choose a fill.
  • Columns: Banded Columns in a table, or =MOD(COLUMN(),2)=0 as a rule.
  • Don’t convert to range if you need new rows to be striped automatically.

Frequently asked questions

Why do my alternating row colors start on the wrong row? +

The formula =ISEVEN(ROW()) or =MOD(ROW(),2)=0 checks the actual sheet row number, not the position inside your selection. If your data starts on an odd row and you want that first row shaded, switch to =ISODD(ROW()) or =MOD(ROW(),2)=1.

Can I color alternate columns instead of rows? +

Yes. In a table, turn on Banded Columns under Table Style Options on the Table Design tab. With conditional formatting, Microsoft's example formula is =MOD(COLUMN(),2)=0.

Will the banding stay correct if I sort or insert rows? +

With a formula rule, yes, because it is recalculated from row numbers, which is why Ablebits recommends it for plain ranges. A table also re-bands as you add rows, but if you convert a table to a range the colors become static and new rows will not be banded automatically.

How do I remove alternating row colors? +

For a formula rule, go to Home > Conditional Formatting > Manage Rules and delete the rule. For a table, clear the Banded Rows checkbox on the Table Design tab or pick a different table style.

Sources

  1. Apply shading to alternate rows or columns in a worksheet (Microsoft Support) (support.microsoft.com)
  2. Apply shading or highlighting to alternate rows in Excel for Mac (Microsoft Support) (support.microsoft.com)
  3. Convert an Excel table to a range of data (Microsoft Support) (support.microsoft.com)
  4. Highlight every other row - Excel formula (Exceljet) (exceljet.net)
  5. Shade alternating groups of n rows - Excel formula (Exceljet) (exceljet.net)
  6. How to Apply Color to Alternate Rows in Microsoft Excel (How-To Geek) (howtogeek.com)
  7. Alternating color rows in Excel - highlight every other row (Ablebits) (ablebits.com)
About this guide. Researched and drafted with AI assistance from the sources above, then checked against our editorial rules. It reflects what was publicly known on October 24, 2026; details can change, so confirm with the official source before acting on it. How we work →

Our reviews

In-depth reviews from Workflow Picks that go with this topic.

Keep reading