• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Conditional format and hidden / filtered rows

cjhawk

New Member
Hoping someone can help. I have searched and played with this for weeks now.

I have a conditional format that I want to change if I hide rows.

list1.jpg list2.jpg

As you can see the "True" value remains the same if I hide rows.

I am not after alternate 'zebra' shading. Which I have achieved via the subtotal formula. I am after shading via category. If I want to hide/filter a category for whatever reason I want the shading to remain alternate per category.

I would prefer not to use VBA - but if it comes to that well.........

Thank you in advance.
 

Attachments

  • list.xlsx
    9.6 KB · Views: 3
Here's Formula method.

You need 1 additional helper column.

In D1: =SUBTOTAL(103,A1)
Copy down.

Then modify C2 formula to...
=IF(AND(A2<>A1,D1=1),NOT(C1),C1)

However, this will fail when you filter out last/first item in category using Manufacturer column.

It will work as long as filter is based on category only.

I'd imagine you can use Match or other function to get around it, but haven't got the time right now to explore.
 

Attachments

  • list.xlsx
    9.6 KB · Views: 5
Here's Formula method.

You need 1 additional helper column.

In D1: =SUBTOTAL(103,A1)
Copy down.

Then modify C2 formula to...
=IF(AND(A2<>A1,D1=1),NOT(C1),C1)

However, this will fail when you filter out last/first item in category using Manufacturer column.

It will work as long as filter is based on category only.

I'd imagine you can use Match or other function to get around it, but haven't got the time right now to explore.

That is fantastic. I have not used the AND formula before. Got to love learning something new.

Thank you very much.
 
Back
Top