Formatting every other row is easily accomplished using conditional formatting. Fortunately, conditional formatting can handle something more specific, formatting every even or odd row.
Many users like to shade every other row to make sheets more readable, especially when there's lots of data. Sometimes restrictions can complicate things, or at least you might think so initially. For instance, you might think that shading only odd or even rows a harder task than shading every other row, but you'd be wrong. Using conditional formatting, formatting only odd or even rows is simple:
- To format even rows only, use the conditional formula =EVEN(ROW())=ROW().
- To format odd rows only, use the conditional formula = ODD(ROW())=ROW().
Now, let's work through a quick example:
- Select the rows you want to format. To select the entire sheet, click the Sheet Selector (the gray cell that intersects the row and column headers).
- Click the Home tab.
- Click the Conditional Formatting dropdown in the Styles group and choose New Rule.
- From the Select A Rule Type list, choose Use A Formula To Determine Which Cells To Format.
- In the Format Values Where This Formula Is True field, enter =EVEN(ROW())=ROW().
- Click Format.
- Specify any of the available formats. For instance, to shade all even rows red, click the Fill tab, click Red, and click OK twice.
Notice that the even rows are now red. To shade odd rows, repeat the above steps. In step 4, enter the formula = ODD(ROW())=ROW(). In step 6, choose a contrasting color, such as green. This technique isn't just for shading, it's for formatting in general.
Okay, that's hideous, but it makes the point well—with little effort, you can format all even or odd rows. Please don't ever do this to a real sheet unless you're pranking someone!