Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data Filter Function in VBA
Is there a function or command using VBA that enables the Data Filters for a certain range....but that does not disable it if it was there in the first place. Have not been able to figure that one out. Selection.AutoFilter I have tried using the line above but the filter is removed if it was there before. Just want to ensure that the filter is always present for a range. Thanks. -- wayliff ------------------------------------------------------------------------ wayliff's Profile: http://www.excelforum.com/member.php...o&userid=29860 View this thread: http://www.excelforum.com/showthread...hreadid=500683 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data Filter Function in VBA
Try this
Public Function RangeFiltered(rng As Range) As Boolean Dim sh As Worksheet Set sh = rng.Parent RangeFiltered = Not Intersect(rng.EntireColumn, sh.AutoFilter.Range) Is Nothing End Function -- HTH Bob Phillips (remove nothere from email address if mailing direct) "wayliff" wrote in message ... Is there a function or command using VBA that enables the Data Filters for a certain range....but that does not disable it if it was there in the first place. Have not been able to figure that one out. Selection.AutoFilter I have tried using the line above but the filter is removed if it was there before. Just want to ensure that the filter is always present for a range. Thanks. -- wayliff ------------------------------------------------------------------------ wayliff's Profile: http://www.excelforum.com/member.php...o&userid=29860 View this thread: http://www.excelforum.com/showthread...hreadid=500683 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
What function to use for filter of data? | Excel Worksheet Functions | |||
Averaging Data continuously when using Filter function - Need Help | Excel Discussion (Misc queries) | |||
Macro function needed for varied searches using a data filter | Excel Programming | |||
Can a pivot table function like data filter? | Excel Programming | |||
Can a pivot table function like data filter? | Excel Programming |