W
Walter Wells
Is it possible to set the field:= to a range name? using auto filter.
I have create some macros to filter a column based on a text string in
a cell. These macros are assigned to a customized toolbar: The code
is as follows:
Range("F1").Select
Selection.AutoFilter
ActiveWindow.ScrollColumn = 1
Selection.AutoFilter Field:=6, Criteria1:="<text string>"
What I would like to do is set the 'Field:=6' to 'Field:=<range name>'
(if possible) so If additional columns are inserted the filter will
still work using the range name rather than the field number (which
get put out of sync when you insert additional columns.
Any help appreciated
I have create some macros to filter a column based on a text string in
a cell. These macros are assigned to a customized toolbar: The code
is as follows:
Range("F1").Select
Selection.AutoFilter
ActiveWindow.ScrollColumn = 1
Selection.AutoFilter Field:=6, Criteria1:="<text string>"
What I would like to do is set the 'Field:=6' to 'Field:=<range name>'
(if possible) so If additional columns are inserted the filter will
still work using the range name rather than the field number (which
get put out of sync when you insert additional columns.
Any help appreciated