How to Color Every Other Row in Excel Quickly
In this article
To quickly color every other row in Excel, the fastest method is to convert your data range into a Table by pressing Ctrl + T and selecting a Table Style. This automatically applies "banded rows," which maintain the alternating color pattern even if you sort, filter, or add new data to the bottom of the list. If you prefer not to use the Table feature, you can use Conditional Formatting with a simple MOD formula to achieve the same visual effect on a standard range of cells.
What You'll Need
- A computer with Microsoft Excel installed (Windows or macOS).
- A dataset or a range of cells that you wish to format.
- Basic familiarity with selecting cells and navigating the Ribbon menu.
Step-by-Step
Depending on your goals, there are two primary ways to achieve alternating row colors. The Table method is best for dynamic data, while the Conditional Formatting method is best for static reports or specific design requirements. Note that menu labels may differ slightly depending on your version of Excel or regional settings.
Method 1: Using Excel Tables (The Fastest Way)
- Select your data: Click any single cell within your data range, or click and drag to highlight the entire area you want to color.
- Convert to Table: Go to the Insert tab on the Ribbon and click Table. Alternatively, use the keyboard shortcut Ctrl + T (Windows) or Command + T (Mac).
- Confirm the range: A dialog box will appear asking "Where is the data for your table?" Ensure the range is correct. If your data has headers (e.g., Name, Date, Amount), make sure the My table has headers checkbox is checked. Click OK.
- Apply Banded Rows: Once the table is created, the Table Design tab will appear in the Ribbon (this tab only shows when a cell inside the table is selected). In the Table Style Options group, ensure the Banded Rows checkbox is checked.
- Choose a color scheme: In the Table Styles gallery on the Table Design tab, click the drop-down arrow to browse different color combinations. Hover over the styles to see a live preview of how the alternating colors will look on your data.
Method 2: Using Conditional Formatting (The Custom Way)
- Select the range: Highlight the specific cells, rows, or columns that you want to apply the alternating colors to. Avoid selecting the entire worksheet if you only have a small amount of data, as this can slow down performance.
- Open Conditional Formatting: Go to the Home tab, click Conditional Formatting in the Styles group, and select New Rule... from the dropdown menu.
- Enter the formula: In the New Formatting Rule window, select the option Use a formula to determine which cells to format. In the text box labeled "Format values where this formula is true," type the following formula:
=MOD(ROW(),2)=0. - Set the color: Click the Format... button. In the Format Cells dialog, go to the Fill tab. Select the background color you want for every other row (usually a light gray or light blue). Click OK.
- Finalize the rule: Click OK again to close the New Formatting Rule window. Your selected range will now show alternating colors based on the row number.
Common Mistakes
One of the most frequent errors is applying alternating colors manually using the Fill bucket tool. While this works for three or four rows, it becomes a nightmare when you add new data. If you manually color row 2, 4, and 6, and then insert a new row at position 3, your pattern is broken, and you must manually recolor the entire sheet. Always use Tables or Conditional Formatting to ensure the pattern is automated.
Another common mistake is selecting the entire worksheet (clicking the top-left corner triangle) before applying a Conditional Formatting formula. Because Excel has over a million rows, applying a formula to every single cell can cause the software to lag or freeze, especially on older computers. It is much more efficient to select only the area where your data actually exists.
Users also often forget to check the "My table has headers" box when creating a Table. If this is left unchecked, Excel will treat your column titles as the first row of data, which can shift your alternating color pattern by one row and make your headers look like part of the data set.
Tips
To change the colors of a Table quickly without browsing the entire gallery, you can create a custom style. Right-click any existing Table Style in the gallery and select Duplicate. This allows you to specifically change the "First Row Stripe" color to a brand-specific hex code or a softer shade that doesn't distract from the text.
If you are using the Conditional Formatting method and want the odd rows colored instead of the even rows, simply change the formula to =MOD(ROW(),2)=1. The MOD function returns the remainder after division; dividing an even row number by 2 leaves a remainder of 0, while an odd row number leaves a remainder of 1.
For those who want alternating columns instead of rows, you can use the same Conditional Formatting logic but replace ROW() with COLUMN(). The formula =MOD(COLUMN(),2)=0 will apply the color to every other column across your spreadsheet.
Troubleshooting
If the colors are not appearing, the first thing to check is whether there is existing manual fill color in the cells. Manual formatting (using the Fill tool) takes precedence over Conditional Formatting. To fix this, select your data, go to the Home tab, click the Fill color icon (paint bucket), and select No Fill. This clears the manual overrides and allows the automated rules to show through.
If you find that the colors are not updating when you insert a new row in a non-table range, check your Conditional Formatting range. Go to Conditional Formatting > Manage Rules. Look at the "Applies to" column. If the range is fixed (e.g., =$A$2:$G$100), it will not automatically cover row 101. You can expand this range manually or use a Named Range to make it dynamic.
If the Table colors disappear after you sort your data, it is likely because you have converted the Table back into a normal range. Check if the Table Design tab is still visible when you click the data. If it is gone, you are no longer in a Table and will need to press Ctrl + T again to restore the banded row functionality.
Frequently Asked Questions
Will alternating colors print on my paper document?
Yes, by default, Table styles and Conditional Formatting colors will print. If you want to save ink, you can go to the Page Layout tab and check Black and white in the Sheet Options group, which will remove the background colors for printing only.
Can I remove the alternating colors quickly?
If you used a Table, go to the Table Design tab and uncheck Banded Rows. If you used Conditional Formatting, go to Home > Conditional Formatting > Clear Rules > Clear Rules from Selected Cells.
Does this work in Excel Online (Web version)?
Yes, the Table method (Insert > Table) works identically in the web version. Conditional Formatting is also available, though the menu layout may be slightly more condensed than the desktop application.
Can I use different colors for every third or fourth row?
Yes, but you must use Conditional Formatting. To color every third row, use the formula =MOD(ROW(),3)=0. This tells Excel to apply the format only when the row number is perfectly divisible by three.
Does converting data to a Table change my formulas?
Converting to a Table may change how your formulas look. Instead of seeing =SUM(A2:A10), you might see =SUM([Amount]). This is called "Structured Referencing." It is generally more accurate because it automatically expands as you add new rows to the table.