Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I came across a post earlier where the user asked how to
display the active criteria being used in an autofiltered- list. They were directed to the following site. http://j-walk.com/ss/excel/usertips/tip044.htm I followed the instructions there. However, the displayed criteria are only updated after I force a refresh (ctrl- alt-F9). Is there a way to autoupdate without needing to do it manually? Thanks in advance The code for the new module follows: Function FilterCriteria(Rng As Range) As String 'By Stephen Bullen Dim Filter As String Filter = "" On Error GoTo Finish With Rng.Parent.AutoFilter If Intersect(Rng, .Range) Is Nothing Then GoTo Finish With .Filters(Rng.Column - .Range.Column + 1) If Not .On Then GoTo Finish Filter = .Criteria1 Select Case .Operator Case xlAnd Filter = Filter & " AND " & .Criteria2 Case xlOr Filter = Filter & " OR " & .Criteria2 End Select End With End With Finish: FilterCriteria = Filter End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display Chosen Autofilter Value | Excel Discussion (Misc queries) | |||
Conflicts with autorefresh in pivot table activating sheet protect | Excel Discussion (Misc queries) | |||
Set autorefresh for Shared Excel Workbook | Excel Discussion (Misc queries) | |||
Autorefresh Fails on Open | Excel Discussion (Misc queries) | |||
VBA Autofilter Criteria | Excel Programming |