+ Reply to Thread
Results 1 to 2 of 2

Copy and paste filtered data

  1. #1
    Registered User
    Join Date
    06-23-2010
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    2

    Copy and paste filtered data

    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!

  2. #2
    Registered User
    Join Date
    03-01-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    57

    Re: Copy and paste filtered data

    Post a sample workbook so we can get a clearer idea as to what you're looking for. I for one am not getting much from your above post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1