ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   AutoFilter Macro (https://www.excelbanter.com/excel-worksheet-functions/155000-autofilter-macro.html)

Carl

AutoFilter Macro
 
Is it possible to set Criteria1 to or Equal To "s" ? I tried but could not
get it to work. Thank you in advance.

Dim s as String
s="=" & Range("A2").Value
Selection.AutoFilter Field:=23, Criteria1:= s, Operator:=xlAnd


bj

AutoFilter Macro
 
try
s="=" & cells(2,1)

"carl" wrote:

Is it possible to set Criteria1 to or Equal To "s" ? I tried but could not
get it to work. Thank you in advance.

Dim s as String
s="=" & Range("A2").Value
Selection.AutoFilter Field:=23, Criteria1:= s, Operator:=xlAnd



All times are GMT +1. The time now is 08:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com