View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default 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