+ Reply to Thread
Results 1 to 5 of 5

Copy row if value found in column "A" matches and paste to a different workbook.

  1. #1
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Copy row if value found in column "A" matches and paste to a different workbook.

    I need to copy a row from one workbook/worksheet to another workbook/worksheet based on the value in column "A". I have tried a dozen different codes I found online and have been unsuccessful in figuring it out. No clue where I went wrong.

    I need every row with "Jane" in column A in workbook1 to copy to workbook2("A5"). Jane may not be grouped together in column A, so it will have to search the entire column, or sort it.

    After doing this, I will do the same thing for "Billy" but in a workbook3.

    attached is a workbook of the source data, the target sheet will look exactly the same, minus the data in "A5" and below.

    Sheet name on both = "Audit Tracker"
    workbook1 = Jane's Tracker
    workbook2 = taylorsm's tracker
    workbook3 = Billy's Tracker
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Copy row if value found in column "A" matches and paste to a different workbook.

    I am working on something, but I receive a Invalid or unqualified error on

    Set aRng = a.Sheets("Audit Tracker").Range("$A$4:A" & ws.Cells(ws.Rows.Count, "a").End(xlUp).Row).AutoFilter
    .AutoFilter Field:=1, Criteria1:="Jane"

    How can I get that to work?

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Copy row if value found in column "A" matches and paste to a different workbook.

    Hi taylorsm

    For some reason the Forum will not allow me to paste Code from the Clipboard directly into the Forum...see Module 5 in the attached.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Copy row if value found in column "A" matches and paste to a different workbook.

    Thanks so much!

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Copy row if value found in column "A" matches and paste to a different workbook.

    You're welcome...glad I could help. Thanks for the Rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 01-22-2016, 09:21 AM
  2. copy sheet 2 data as it is in sheet3 if column "B" matches in sheet1 & Sheet2
    By shloksurya in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2015, 09:35 PM
  3. [SOLVED] Need Macro to filter and copy column that matches "name" in cell
    By Ochimus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-31-2015, 04:50 AM
  4. Macro to copy cells from workbook,where column C is = "num1" AND Column D ="num2"
    By jarious87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-10-2013, 03:30 PM
  5. [SOLVED] Copy multiple rows that contain a certain "name" in column "A" then paste it into new work
    By rschlot2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-18-2013, 02:25 PM
  6. Macro to copy and paste rows based on "text" found in Column A
    By balston2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-09-2013, 12:35 PM
  7. [SOLVED] Loop to check for "yes" then copy the IDs with "yes" and paste to other workbook
    By Hallet in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-11-2012, 12:41 PM

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