I am very new at using macros and only know how to record macros using the recorder. I know nothing about code. I tried to record a macro that copies filtered data from one worksheet to another, but it doesn't work. Here is the code:

Sub Macro6()
'
' Macro6 Macro
' Macro recorded 6/23/2010 by n0200686
'

'
Selection.AutoFilter Field:=7, Criteria1:="Yes"
Range("D2").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToLeft)).Select
Selection.Copy
Sheets("DUPLICATE_AGENCY_CODE").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("QUERY_FOR_AGENCY_HIERARCHY").Select
Application.CutCopyMode = False
Range("A1").Select
Sheets("DUPLICATE_AGENCY_CODE").Select
Range("A1").Select
End Sub

I have been looking at other posts to learn how to do this, but I don't even know where to insert new code. Thanks!