Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rows hidden by Autofilter vs hidden by changing the Hidden property
Hi, does anyone know how to determine if a Row is currently hidden by an
autofilter? If a row is hidden (by an autofilter or by changing the EntireRow.Hidden property to True), the Hidden property of the EntireRow returns True. Therefore the Hidden property cannot be used to determine if the row has been hidden by an autofilter or not. If a row is hidden by criteria of an AutoFilter, it does not function as when hidden in other ways. This example demonstrates this: An autofilter has a criteria applied- rows 3 and 4 are hidden as a result. If you select Rows 2 to 5 and apply a specific formatting, the formatting only is applied to the visible rows, i.e. 2 and 5, not 3 and 4. If, on the other hand, you do Rows("3:4").hidden = true, then select Rows 2 to 5 and apply a specific formatting, the formatting is applied to both visible and hidden rows, i.e. 2 to 5. Is there a property that can tell me this "hidden level"? Thank you very much. Leo |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rows hidden by Autofilter vs hidden by changing the Hidden propert
You could check against the criteria of the filter.
-- Regards, Tom Ogilvy "LEO@KCC" wrote: Hi, does anyone know how to determine if a Row is currently hidden by an autofilter? If a row is hidden (by an autofilter or by changing the EntireRow.Hidden property to True), the Hidden property of the EntireRow returns True. Therefore the Hidden property cannot be used to determine if the row has been hidden by an autofilter or not. If a row is hidden by criteria of an AutoFilter, it does not function as when hidden in other ways. This example demonstrates this: An autofilter has a criteria applied- rows 3 and 4 are hidden as a result. If you select Rows 2 to 5 and apply a specific formatting, the formatting only is applied to the visible rows, i.e. 2 and 5, not 3 and 4. If, on the other hand, you do Rows("3:4").hidden = true, then select Rows 2 to 5 and apply a specific formatting, the formatting is applied to both visible and hidden rows, i.e. 2 to 5. Is there a property that can tell me this "hidden level"? Thank you very much. Leo |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rows hidden by Autofilter vs hidden by changing the Hidden propert
Thanks Tom. Unfortunately that will not work.
I need to cycle through rows/ranges and determine how they have are hidden. The rows that are below the autofiltered rows have nothing to do with the autofilter or its criteria. Leo |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rows hidden by Autofilter vs hidden by changing the Hidden pro
and for those, you can determine the extent of the autofilter.
set r = Activesheet.Autofilter.Range lastrowoffilter = r(r.count).row if cell.row lastrowoffilter then if cell.EntireRow.Hidden = True then ' not hidden by filter -- Regards, Tom Ogilvy "LEO@KCC" wrote: Thanks Tom. Unfortunately that will not work. I need to cycle through rows/ranges and determine how they have are hidden. The rows that are below the autofiltered rows have nothing to do with the autofilter or its criteria. Leo |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rows hidden by Autofilter vs hidden by changing the Hidden pro
Brilliant. Basically you are checking which cell (of the range I am
evaulating) belongs to the Autofilter.Range or not (and if it is hidden or not). This offers a solution to my problem, thank you very much Tom. Nevertheless, is there a property or condition that changes in a range object when it has been hidden by the autofilter and that can be read directly to determine the mode of "hiddenness" of such object? Leo "Tom Ogilvy" wrote in message ... and for those, you can determine the extent of the autofilter. set r = Activesheet.Autofilter.Range lastrowoffilter = r(r.count).row if cell.row lastrowoffilter then if cell.EntireRow.Hidden = True then ' not hidden by filter -- Regards, Tom Ogilvy "LEO@KCC" wrote: Thanks Tom. Unfortunately that will not work. I need to cycle through rows/ranges and determine how they have are hidden. The rows that are below the autofiltered rows have nothing to do with the autofilter or its criteria. Leo |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
opening a group but keep hidden rows hidden | Excel Discussion (Misc queries) | |||
Hidden rows columns won't stay hidden | Excel Worksheet Functions | |||
Formula or Code to keep Hidden Rows Hidden | Excel Worksheet Functions | |||
I need my Hidden Rows to stay hidden when I print the sheet. | Excel Discussion (Misc queries) | |||
AutoFilter & Hidden Rows | Excel Programming |