alternating format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Someone (I think) mentioned to me that there was a way in Excel 2003 to have
line formatting alternate to make a ledger-style effect (every other line is
white or a color).

True, or am I make-believing?

Thx.
 
True! You can do this with Conditional Formatting.

Highlight your entire worksheet (or just the area that you want shaded)
Then, from the Format Menu, select "Conditional Formatting..."
Change "Cell Value Is" to "Formula Is"
Enter the formula: =MOD(ROW(),2)=0
Set your format
Click OK

That should do it. This shades all even numbered rows. If you'd rather
have odd numbers shaded, then change the 0 to a 1 in the above formula.

HTH,
Elkar
 
A related question: is there a way to format entire rows of a spreadsheet
such that if the value or text of a cell is different than the cell above
(simple example: if a2=a1, then the row is the same color (say red) as the
row above; if a2 is not equal to a1, then the row color changes to no fill
(white), and repeat this for all the rows in the spreadsheet. In other words
I need the formula to be a relative reference to the cell above, not an
absolute reference to rows 1 and 2.
 
Back
Top