I'm trying to use an active cell value as the criteria for a filter on another work sheet.
My Active cell value (in the first sheet ("WIthout Dupes") should be the value of filter criteria in the second sheet ("Master"). So ultimately my code should not have Range("B$142").Select
but the Active cell value and the criteria1 should be referring to the Active cell value of the first sheet.
I tried to use
Sub test1()
'
' test1 Macro
'
'
Range("B$142").Select
Selection.Copy
Sheets("Master").Select
ActiveSheet.Range("$A$1:$AR$1787").AutoFilter Field:=1, Criteria1:= _
"00065062"
Columns("X:X").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("WIthout Dupes").Select
Range("B145").Select
ActiveSheet.Paste
Sheets("Master").Select
Application.CutCopyMode = False
ActiveSheet.ShowAllData
Range("A1").Select
Sheets("WIthout Dupes").Select
Range("B143").Select
ActiveCell.FormulaR1C1 = "done"
End Sub