Conditional Formatting and Filtered Rows

LAAdams17

Board Regular
Joined
Oct 23, 2009
Messages
57
When using conditional formatting to separate sections of a table, for example when DATE in Column A changes from one day to the next (conditional formatting rule description =$A2 <> $A1), how does one get around the issue when using filters and the first 'TRUE' instance of =$A2 <> $A1 is a hidden row so the separator is not seen? Is there some way to just compare visible (unhidden) rows? Thank you.
 

Some videos you may like

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

RJPotts

Board Regular
Joined
Apr 11, 2007
Messages
139
The conditional formatting rule in cell A2 (I'm assuming you have a header in A1 and that the list is in chronological order, oldest date in A2, most recent date at the bottom) would be;

Code:
=SUBTOTAL(4,$A$1:A1)<>A2

Best regards
Richard
 

RJPotts

Board Regular
Joined
Apr 11, 2007
Messages
139
The conditional formatting rule in cell A2 (I'm assuming you have a header in A1 and that the list is in chronological order, oldest date in A2, most recent date at the bottom) would be;

Code:
=SUBTOTAL(4,$A$1:A1)<>A2

Best regards
Richard

Did that work???
 

LAAdams17

Board Regular
Joined
Oct 23, 2009
Messages
57
I don't believe your solution would account for the hidden rows. Here's the solution that worked: =SUMPRODUCT(--(B$2:B3=B3),(SUBTOTAL(103,OFFSET(B3,ROW(B$2:B3)-ROW(B3),,))))=1. I needed to use this b/c I decided I needed to use a text column instead of date column. Thank you for your assistance.
 

RJPotts

Board Regular
Joined
Apr 11, 2007
Messages
139
I don't believe your solution would account for the hidden rows. Here's the solution that worked: =SUMPRODUCT(--(B$2:B3=B3),(SUBTOTAL(103,OFFSET(B3,ROW(B$2:B3)-ROW(B3),,))))=1. I needed to use this b/c I decided I needed to use a text column instead of date column. Thank you for your assistance.

If I read your original question (& criteria) correctly, you wanted the first occurrence of each new date to be highlighted, yes? Where that first occurrence was hidden by a filter you wanted the first visible occurrence of the new date to be highlighted?

Best regards
Richard
 

Watch MrExcel Video

Forum statistics

Threads
1,123,400
Messages
5,601,467
Members
414,452
Latest member
Dannysamworth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top