Aman Semwal
Member
Hi,
Need help with my code below:
ActiveSheet.Range("$A:$S").AutoFilter Field:=1, Criteria1:=Array( _
Worksheets(2).Range("A2").Value), Operator:=xlFilterValues
Worksheets(2).Range("A2").Value = "1","2","3"
This doesn't filter the 1,2,3 from the cell A2.
But when i go with below code it filter the set of range with the criteria.
ActiveSheet.Range("$A:$S").AutoFilter Field:=1, Criteria1:=Array( _
"1","2","3"), Operator:=xlFilterValues
why cant i filter it when i use it with cell value ?
Need help with my code below:
ActiveSheet.Range("$A:$S").AutoFilter Field:=1, Criteria1:=Array( _
Worksheets(2).Range("A2").Value), Operator:=xlFilterValues
Worksheets(2).Range("A2").Value = "1","2","3"
This doesn't filter the 1,2,3 from the cell A2.
But when i go with below code it filter the set of range with the criteria.
ActiveSheet.Range("$A:$S").AutoFilter Field:=1, Criteria1:=Array( _
"1","2","3"), Operator:=xlFilterValues
why cant i filter it when i use it with cell value ?