Highlighting every other row in Excel takes one of two routes: static shading applied through the Fill Color swatch, or a banded look generated by conditional formatting with the formula =MOD(ROW(),2)=0. The first route survives sorting and filtering but breaks the moment you insert a row, while the second survives edits automatically and refreshes itself for the entire used range. Pick the static route for a file you'll print once, the formula route for a worksheet that keeps growing.

Excel has carried conditional formatting since Excel 97, and the MOD/ROW combination that powers the banded effect has worked unchanged through every release since, including Microsoft 365, Excel 2024, and Excel 2021. That stability matters: every step below works on any version released in the last two decades, so you won't hit a menu that moved. The differences show up in how the rule handles blank rows, merged cells, and structured tables β€” the three places where most people's banding quietly fails.

One note before the steps. Every method here applies formatting to whole rows, which means row height grows and shrinks with the banded look and text stays readable. Column banding needs a different formula, covered separately, because ROW and COLUMN are not interchangeable and a column-striped sheet reads very differently on screen.

The Fill Color Method: What It Does and Where It Breaks

The fastest path to alternating rows is manual shading, and it takes about four clicks per row. Select a row by clicking its row header on the left edge (the gray number strip), click the Fill Color paint-bucket icon in the Home tab's Font group, choose a light shade such as White, Background 1, Darker 15%, then hold Ctrl and click the next row header you want shaded. Repeating that is fine for a ten-row table and miserable for a two-hundred-row one.

For longer ranges, the Format Painter does the heavy lifting. Shade one row, select it, click Format Painter once (double-click to lock it), then drag across each row you want matched. Excel copies the fill and nothing else if you only applied fill, which keeps the operation clean. Press Escape to release the painter when you finish.

The method's real weakness is that it records a color, not a rule. Insert a row above your shading and the pattern shifts by one: shaded rows become unshaded and the whole table looks off by a stripe. Delete a row and the same drift happens in reverse. Sorting doesn't break the fill because the fill travels with the cell, but the alternating rhythm does break if your sort moves rows between banded and unbanded positions.

Manual shading does have one advantage the formula route can't match: you can shade arbitrary rows, skip rows, or band a subset of a table without writing anything. If your goal is to highlight every third row rather than every other row, the Fill Color approach is genuinely competitive with conditional formatting for a one-time job.

The Conditional Formatting Formula That Bands an Entire Worksheet at Once

This is the method most Excel trainers reach for, and it's the one worth memorizing. Select the range you want banded β€” click the top-left cell, then Shift-click the bottom-right cell, or press Ctrl+A inside the data block. On the Home tab, open Conditional Formatting, choose New Rule, then "Use a formula to determine which cells to format."

Type =MOD(ROW(),2)=0 in the formula box and click Format. On the Fill tab, pick a light color and confirm with OK twice. Every even-numbered row in the selection now carries the fill, and the rule recalculates automatically whenever rows are inserted or deleted. Swap the zero for a one β€” =MOD(ROW(),2)=1 β€” and Excel shades odd rows instead, which matters when your header sits in row 1 and you want the banding to start below it.

The MOD function returns the remainder after division. ROW() returns the current row number, so MOD(ROW(),2) yields 0 for even rows and 1 for odd rows, and the comparison drives the format. That's the entire mechanic. There's no helper column, no macro, and no dependency on how many rows you selected at the start.

The range you choose does matter. If you apply the rule to A1:Z500 and later add data in row 501, the banding stops at row 500 because the rule stops where the range stops. Applying the rule to entire columns (click the column header for A, Shift-click the header for Z) removes that ceiling, though it slows recalculation slightly on very large workbooks because Excel evaluates the rule against every cell in those columns.

Version-Specific Differences Most Guides Skip

Excel 2007 introduced the current Conditional Formatting Rules Manager, and Microsoft hasn't changed its layout meaningfully since. Where versions diverge is in the ribbon: Excel 2003 and earlier buried the feature under Format > Conditional Formatting with a simpler three-condition dialog, while everything from Excel 2007 forward uses the Home tab ribbon. If you're following a tutorial written for Excel 2003, the menu names won't match what you see.

Excel for the web supports the same MOD/ROW rule and the same Rules Manager dialog, so a file banded in the desktop app displays correctly in the browser. The web version's conditional formatting menu exposes fewer preset options but accepts custom formulas without trouble. Google Sheets users get an identical formula β€” =MOD(ROW(),2)=0 works there too β€” though Sheets calls the feature "Conditional formatting" under the Format menu and the rule-creation flow differs.

Excel 2021 and Excel 2024 (the perpetual-license releases) include conditional formatting fully; nothing here requires a Microsoft 365 subscription. That's worth stating plainly because some formatting features β€” certain dynamic array behaviors and newer functions β€” do require 365, and readers often assume all formatting does. Banding does not. The only feature gap that touches this topic is the Table Styles gallery, which is present in every version from Excel 2007 onward.

Use an Excel Table and Let the Banded Rows Style Handle It

Converting your range to an Excel Table (Ctrl+T, or Insert > Table) gives you banded rows as a built-in style option, and it's the least fragile approach. Select your data, press Ctrl+T, confirm the "My table has headers" box, and Excel applies a default style with banding already on. The Table Design tab (called "Design" in newer versions) offers a Rows section with a "Banded Rows" checkbox you can toggle on and off.

The Banded Rows checkbox is on by default, and unchecking it removes the striping without removing the table. That gives you a one-click switch that the conditional formatting method can't offer. Table styles also refresh automatically as you add rows: type a new record directly beneath the last one and the table expands, carrying the banding with it.

Tables impose a structure you may not want. They don't allow merged cells inside the table body, they add filter dropdowns to every header, and they name themselves (Table1, Table2, and so on) in the Name Box. If your worksheet has merged cells in the data area β€” a common layout in budget templates and printed reports β€” Ctrl+T will refuse the conversion with an error about merged cells, and you'll need the conditional formatting route instead.

The style choice matters for readability. The default Table Style Medium 2 uses a blue header and light blue banding; the Light styles under Table Style Light 1 through Light 21 give subtler stripes. You can change the style from the Table Design tab's gallery without touching a formula.

How to Stop Header Rows and Totals Rows From Getting Banded

Standard =MOD(ROW(),2)=0 banding treats the header like any other row, so a header in row 1 gets an odd-row exemption and the first data row shades β€” usually fine, sometimes not. If your header row must stay visually distinct, apply the rule to the data rows only. Select from the first data row (say A2) to the last, and use the same formula. The header, untouched by the rule, keeps whatever fill you gave it.

A totals row at the bottom creates the opposite problem: it falls inside the banded range and may or may not shade depending on where it lands. Formulas that use a fixed bottom row number break when rows are added above the total. One fix is to apply the rule to an "applies to" range that excludes the final row, then re-extend it manually whenever you add records β€” clumsy, but predictable.

A cleaner approach skips the issue entirely. Use a formula that checks for blanks in a key column: =AND(MOD(ROW(),2)=0,$A1<>""). That shades even rows only when the row contains data, so empty rows below the table and a blank spacer above a totals row stay unshaded. The && operator works the same way if you prefer it to AND, though AND reads more clearly.

If your total row sits inside an Excel Table and you've toggled the Total Row option on the Table Design tab, the table's own style handles the distinction automatically β€” totals rows get their own formatting band and the striping stops above them. That's another vote for the table method when your layout permits it.

Alternating Columns Instead of Rows, and Mixed Stripe Sizes

The question asks about rows, but the same mechanic bands columns with one substitution: =MOD(COLUMN(),2)=0 shades even-numbered columns. Apply it to the range you want striped vertically rather than horizontally. Column banding suits wide reference tables where horizontal reading across a row is easier with vertical guides.

Combining the two produces a checkerboard, which is almost never what anyone wants on a data table. It does have a legitimate use in seating charts, calendar grids, and inventory matrices. The formula is =MOD(ROW(),2)+MOD(COLUMN(),2)=0 for one set of squares, with the complementary =MOD(ROW(),2)+MOD(COLUMN(),2)=1 for the others, applied as two separate rules.

Stripe width beyond two rows needs a division step. To shade every third row, use =MOD(ROW(),3)=0; every fourth row, =MOD(ROW(),4)=0. To shade groups of three rows with three unshaded rows between them β€” the pattern used in some ledger layouts β€” write =MOD(ROW(),6)<3. That's a comparison rather than an equality check, so it returns TRUE for remainders 0, 1, and 2 and FALSE for 3, 4, and 5, producing six-row cycles.

Merged cells over multiple rows break all of these formulas visually. A merge spanning rows 4 through 6 shows banding based on the top-left cell only, so a merged block may appear half-shaded across its height. Excel doesn't offer a clean fix. The practical workaround is to unmerge, band, and re-merge, accepting that the merged area takes the top cell's fill.

Striping a Filtered Range Without Shading the Hidden Rows

Filtered tables expose a subtle trap. The MOD/ROW formula references the row's absolute position, not its position in the visible list. Filter out every other record and the visible rows no longer alternate β€” they show gaps where hidden rows would have been shaded. The banding still "works" in the sense that the rule is calculating correctly; it just looks broken.

SUBTOTAL solves this. The function with its first argument set to 103 counts only visible cells in a range, so =MOD(SUBTOTAL(103,$A$1:$A1),2)=0 counts how many visible rows exist from the top of the range down to the current row and bands based on that running count. Filter the table and the visible rows re-band contiguously. This is the formula to use when the sheet is a working list rather than a printed report.

Two conditions apply. The helper column referenced in SUBTOTAL must be populated on every row, or the count misses rows and the pattern drifts. The range must be anchored with dollar signs on the top cell ($A$1) and left relative on the bottom ($A1) so the count expands as the rule moves down the column. Copy those anchors wrong and every row shades identically.

Performance is the cost. SUBTOTAL recalculates on every filter change, and on a table with several thousand rows the banding redraws noticeably slower than the plain MOD/ROW version. For datasets past roughly 50,000 rows, the flicker during filtering becomes noticeable on older hardware. Test on your own file rather than trusting a general rule β€” the threshold depends on the workbook's other formulas.

Copying a Banded Format to Other Sheets and Keeping It Stable

Conditional formatting rules travel when you copy cells, and they respect relative references. Copy a banded range from Sheet1 and paste it into Sheet2 at a different starting row, and the banding shifts to match the new row numbers rather than the old ones. That's usually what you want: the pattern stays anchored to the grid, not to the copied content.

The Rules Manager is where you audit and repair. Home > Conditional Formatting > Manage Rules shows every rule on the sheet, its range, and whether it applies. Use the "Show formatting rules for" dropdown to switch between the current selection, the current worksheet, and the whole workbook. A common problem is duplicate rules stacking from past edits β€” five copies of the same banding rule, all active, all fighting. Delete the extras and the sheet recalcs immediately.

Two failure cases are worth knowing by name. First, a rule applied to a range like A1:A10 instead of the full row range produces banding only in column A, which looks like a broken formula to anyone scanning the sheet. Check the "Applies to" field in the Rules Manager for the exact range. Second, pasting over a banded range with "Keep Source Formatting" can wipe the destination's rules if the pasted content carries its own formatting set.

To quantify the difference between methods, consider a monthly report regenerated 12 times a year. Manual fill takes roughly two minutes per rebuild across a 40-row table, or about 24 minutes a year. The conditional formatting setup takes under 60 seconds once, then zero per rebuild. The arithmetic favors the formula route after two cycles β€” which is the strongest argument for learning it.

FAQ

Does highlighting every other row affect Excel's sorting and filtering?

Banding via conditional formatting survives sorting unchanged because ROW() recalculates after the sort, so the stripes stay anchored to screen position. Manual fill travels with cell contents instead, so a sort can scramble the striped look. Filtering breaks both methods' appearance unless you use the SUBTOTAL variant.

Why does my alternating row color stop partway down the sheet?

The "Applies to" range in the rule ends before your data does. Open Manage Rules under Conditional Formatting and check the range field β€” it likely reads something like $A$1:$Z$200 while your data now runs to row 340. Extend the range or reapply the rule to entire columns.

Can I band rows in Excel without using conditional formatting at all?

Yes, two ways. The Format as Table command with Ctrl+T applies a banded table style automatically, and manual fill with the Format Painter handles small ranges. Tables are the more durable no-formula option because the banding follows the table as it grows.

What's the difference between banding rows in an Excel Table and using conditional formatting?

Table banding toggles on and off with one checkbox and extends automatically to new rows; conditional formatting follows a formula you control and works on ranges that can't be tables, such as blocks with merged cells. Tables forbid merged cells, which is the deciding factor for many report layouts.

Does the MOD formula work in Google Sheets and Excel for the web?

Yes. Google Sheets accepts =MOD(ROW(),2)=0 in its Format > Conditional formatting dialog, and Excel for the web supports the same rule through its ribbon. The dialog wording differs slightly across platforms but the formula text is identical.

How do I shade every third row instead of every other row?

Replace the divisor: =MOD(ROW(),3)=0 shades rows 3, 6, 9, and so on. For bands of three shaded rows followed by three clear rows, use =MOD(ROW(),6)<3, which stays TRUE across three consecutive remainders rather than one.

Why do merged cells look half-shaded when I apply row banding?

A merged cell spanning several rows takes its fill from the rule's evaluation on the top-left cell alone, so the merged block shows one color across its whole height while neighboring unmerged rows alternate around it. Excel offers no built-in fix; unmerge, band, and re-merge is the only clean workaround.

Is there a limit to how many rows conditional formatting can band?

No hard cap exists on rows, but performance degrades on ranges applied to entire columns in workbooks past roughly 100,000 rows, where the rule is evaluated for every cell in the selection. Restricting the "Applies to" range to your actual data footprint keeps recalculation fast.