Preventing a Filter from affecting cell shading

  • Thread starter Thread starter guilbj2
  • Start date Start date
G

guilbj2

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 ?
 
This is a beginning (Conditional Formatting)

Blue: =MOD(SUBTOTAL(3;B$6:B4);2)=0
Green: =MOD(SUBTOTAL(3;B$6:B4);2)=1

Ola Sandströ

+-------------------------------------------------------------------
|Filename: Book4.zip
|Download: http://www.excelforum.com/attachment.php?postid=3440
+-------------------------------------------------------------------
 
Thanks for the help guys, but I'm a total newbie to conditiona
formatting... The range I need to get setup are D8:D34. Could yo
elaborate on how/where I should enter these formulas ?

Just to be a royal pain, I'm trying to alternate between white an
light green as well if you know the correct colour codes
 
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 Format>Conditional 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.
 
Back
Top