Hello,
I tried to record a macro to copy value of a cell in Sheet 1 and use it to filter a table in sheet 2 but the macro pulls in the absolute value that is in the cell for example in the code below
Sub Macro3()
'
' Macro3 Macro
'
'
Range("A3").Select
Selection.Copy
Sheets("Sheet2").Select
ActiveSheet.Range("$A$1:$C$7").AutoFilter Field:=1, Criteria1:="=2", _
Operator:=xlAnd
End Sub
The sorting value is copied from A3 of Sheet 1 and then used to sort the table in Sheet 2 but as the code suggests the Criteria1:="=2" is taking the value at the time of recording the macro, how I can edit the macro to pull in whatever value is there in A3?
Thanks,
Aadesh.
Bookmarks