View Single Post
  #7   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

You can do this if you add a helper column to the table:

Insert a blank column (column A in this example)
Add a heading, e.g. Count
In row 2, enter the following formula, where column B
contains no blank cells within the table range:
=SUBTOTAL(3,$B$2:$B2)
Copy the formula down to all rows of data
Select cell A1
Select all the cells on the worksheet (Ctrl + A)
Choose FormatConditional Formatting
From the first dropdown, choose Formula Is
In the formula box, type:
=AND($A1<"",MOD($A1,2)=0)
Click the Format button, and select a colour for the shaded rows
Click OK, click OK

Filter the table, the count will change, and alternate rows will be shaded.

guilbj2 wrote:
I've shaded every other line on a spreadsheet to make it easier to read,
but I'm also using filters. When I filter results, the cell shading is
also filtered out, so instead of white line/gray line over and over I
get blocks of colour which defeat the purpose of the shading. Does
anyone know a way around this ?




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html