Good afternoon.
Im after a little VBA help. Ive created a macro that filters a column based on a cell. However the macro reads this as “=TP351033C” when I really want to be able to change the cell to a new value and then rerun in future.
Im sure its got something to do with DIM but cant crack it cheers
Sample macro
Range("B4").Select
Selection.Copy
Sheets("Defects").Select
ActiveSheet.Range("$A$1:$AS$309").AutoFilter Field:=2, Criteria1:= _
"=TP351033C", Operator:=xlAnd
Im after a little VBA help. Ive created a macro that filters a column based on a cell. However the macro reads this as “=TP351033C” when I really want to be able to change the cell to a new value and then rerun in future.
Im sure its got something to do with DIM but cant crack it cheers
Sample macro
Range("B4").Select
Selection.Copy
Sheets("Defects").Select
ActiveSheet.Range("$A$1:$AS$309").AutoFilter Field:=2, Criteria1:= _
"=TP351033C", Operator:=xlAnd