Thanks Whatsup. I am a bit confused with the entering a formula in sheet 2 and putting the code in. Like I said If sheet 1 is not open where the saved macro is (which I recorded), I get error - I am looking for a way to make the macro run regardless of which sheet is open. Your assistance in getting this right will be appreciated. Below is my sample code, kindly modify to make it clearer. Thanks
Sub Trials()
'
' Trials Macro
'
'
Selection.AutoFilter
ActiveSheet.ListObjects("Table_Query_from_MS_Acces s_Database").Range. _
AutoFilter Field:=6, Criteria1:="Owner"
ActiveSheet.ListObjects("Table_Query_from_MS_Acces s_Database").Range. _
AutoFilter Field:=13, Criteria1:="WA"
Cells.Select
Range("Table_Query_from_MS_Access_Database[[#Headers],[First Name]]").Activate
Selection.Copy
Sheets("Result").Select
Range("A1").Select
ActiveSheet.Paste
Range("A1").Select
End Sub
|