Keep hidden rows hidden when filtered

RattlingCarp3048

Board Regular
Joined
Jan 12, 2022
Messages
166
Office Version
  1. 365
Platform
  1. Windows
Is there a way to keep hidden rows hidden when filtering/unfiltering?

I have a code that will hide rows when certain criteria is met. However, when we use basic filter to examine the visible rows we noticed the hidden rows are now visible. Is there a way to keep them hidden regardless of the basic filter being used?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Is there a way to keep hidden rows hidden when filtering/unfiltering?

I have a code that will hide rows when certain criteria is met. However, when we use basic filter to examine the visible rows we noticed the hidden rows are now visible. Is there a way to keep them hidden regardless of the basic filter being used?
Bump
 
Upvote 0
So it sounds like your want to "filter" and already "filtered list" (so, a you want a "filter" of a "filter")?

I believe any filter you use is going to override any previous filters.
So if you want to apply a second filter on top of the first one, you may need to incorporate the logic for BOTH filters in your second filter.
Depending on how complex your filters are, that may require an advanced filter.

Another option is to use Advanced Filters from the start, and Filter the results to a new location. Then there are no hidden rows in your result.
You could then apply your second filter to this new filtered lists.

Yet, another option is to use a database program like Microsoft Access, where you can easily do a "Query of a Query" (queries is where filters are done).
I think you may be able to do the same thing in Excel if you use Power Pivot. It is not something I have used much of before myself, since I use Microsoft Access so much, but we do have a forum for that: Power Tools
 
Upvote 0
So it sounds like your want to "filter" and already "filtered list" (so, a you want a "filter" of a "filter")?

I believe any filter you use is going to override any previous filters.
So if you want to apply a second filter on top of the first one, you may need to incorporate the logic for BOTH filters in your second filter.
Depending on how complex your filters are, that may require an advanced filter.

Another option is to use Advanced Filters from the start, and Filter the results to a new location. Then there are no hidden rows in your result.
You could then apply your second filter to this new filtered lists.

Yet, another option is to use a database program like Microsoft Access, where you can easily do a "Query of a Query" (queries is where filters are done).
I think you may be able to do the same thing in Excel if you use Power Pivot. It is not something I have used much of before myself, since I use Microsoft Access so much, but we do have a forum for that: Power Tools
Sorta, not really. the end goal that i am trying to accomplish is to permanently hide certain rows in order to clean up the data. but i cannot delete because we need to keep the historical data. I have taken several approaches to this with no real success. The easiest and most logical route is for the user to just use the basic filter and uncheck what they dont want to see. however, we have several users complaining of the extra step to filter (insert eye roll)......

If i simply select the row, right-click, hide the entire row(s) that works fine. However, like you said, when i use basic filter the "hidden" rows now become visible as excel has now made those rows visible again. i want them to always be hidden regardless of the basic filter and to only be visible if manually unhidden.

Soooo i attempted creating a macro that automatically copies said rows to a different tab and deletes from the original tab. No dice. I worked with another member on this site over a week and finally gave up on that approach. the headers will not always match and for some reason the code kept getting hung up when inserting new column headers. Then i tried changing the row size to 0.1 in order to "hide" the row but then when i attempted to print, it was printing all of the "hidden" rows which we didnt want. I have looked at the advanced filter option but the headers wont match unless we manually update them. Then i tried taking this approach to simply hide the rows, however, excel keeps making them visible again.

the ultimate end goal is to keep the hidden rows hidden regardless of the basic filters in use.
 
Upvote 0
Yes, using Filters will automatically override any manual row hiding that you have done. I do not think you can manual hide rows and have your filters honor that.

How about adding another column to your data, with a title something like "Hide Row", and if you type "Yes" in there, include that in your Filter determination, so the filters will hide those rows?
 
Upvote 0
Yes, using Filters will automatically override any manual row hiding that you have done. I do not think you can manual hide rows and have your filters honor that.

How about adding another column to your data, with a title something like "Hide Row", and if you type "Yes" in there, include that in your Filter determination, so the filters will hide those rows?
I hadnt thought of that but will give it a try. if not at least i know for sure excel will not honor what im trying to do and the users will just have to use the basic filter. ?‍♂️

Thanks!
 
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,618
Members
449,092
Latest member
amyap

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