Conditional Formatting and Filtered Rows

LAAdams17

Board Regular
Joined
Oct 23, 2009
Messages
73
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.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
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
 
Upvote 0
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???
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,510
Members
448,967
Latest member
screechyboy79

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
Back
Top