+ Reply to Thread
Results 1 to 14 of 14

Copy row data to new workbook when criteria is met

  1. #1
    Registered User
    Join Date
    06-10-2009
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2016, Excel 365
    Posts
    93

    Copy row data to new workbook when criteria is met

    Hi all,

    Please help with the code below. I just copied the code in my previous template but can't make it work.. basically, I want to copy the entire row when the criteria is met I have attached my workbooks for easy reference.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Copy row data to new workbook when criteria is met

    1) Amend your code
    Please Login or Register  to view this content.
    2) Autofilter
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-10-2009
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2016, Excel 365
    Posts
    93

    Re: Copy row data to new workbook when criteria is met

    hi Jindon,

    Thank you. The code works perfectly but how to remove the running cursor in the last row of source data? Also, can you please add a code not to copy the row that is already added in the target, only the new row. Maybe, higlighting the cell with "B" value of column E when it is already copied so only the new row will be copied when submit button was click.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Copy row data to new workbook when criteria is met

    The try change in 2nd code
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-10-2009
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2016, Excel 365
    Posts
    93

    Re: Copy row data to new workbook when criteria is met

    I used the code no. 1 that you provided but I tried the second one and it works ok too. Can you also do the same for the 1st code because i can easily understand the lines of that code that the 2nd one. thank you.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Copy row data to new workbook when criteria is met

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-10-2009
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2016, Excel 365
    Posts
    93

    Re: Copy row data to new workbook when criteria is met

    apologies for asking many question....how about to copy not the entire row but range of cells... only column A to D...

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Copy row data to new workbook when criteria is met

    Just change to
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    06-10-2009
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2016, Excel 365
    Posts
    93

    Re: Copy row data to new workbook when criteria is met

    I used data validation in Buyer Column, when I click submit, it copies the validation drop down arrow in the target. I tried to add the paste values code... it doesn't work.

    Please Login or Register  to view this content.

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Copy row data to new workbook when criteria is met

    Change to
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    06-10-2009
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2016, Excel 365
    Posts
    93

    Re: Copy row data to new workbook when criteria is met

    nope. still copied the drop down arrow of the data validation. Attachment 640474

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Copy row data to new workbook when criteria is met

    That's absolutely impossible. Destination might have data validation already.

    Your picture is invalid anyway.

  13. #13
    Registered User
    Join Date
    06-10-2009
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2016, Excel 365
    Posts
    93

    Re: Copy row data to new workbook when criteria is met

    yeah, you're right.. I deleted the data validation in destination wrkbk.

    Thank you Jindon.

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Copy row data to new workbook when criteria is met

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. [SOLVED] Copy data from one workbook to another based on criteria
    By goranimo in forum Excel Programming / VBA / Macros
    Replies: 55
    Last Post: 03-06-2023, 10:14 AM
  2. Copy Data from workbook into another based on certain criteria
    By Rossko7226637 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-07-2015, 08:48 AM
  3. [SOLVED] Query Copy Data from one workbook to another workbook IF 2 x Criteria's match
    By Excel_Padwan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-19-2015, 02:58 AM
  4. Replies: 5
    Last Post: 01-22-2013, 01:33 AM
  5. [SOLVED] Copy specific data from one workbook to another workbook with certain criteria
    By marc5354 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-12-2012, 12:09 PM
  6. Copy specific data from one workbook to another workbook if certain criteria
    By excelvb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-04-2011, 04:14 AM
  7. Copy specific data from one workbook to another workbook if certain criteria
    By ejschulte2001 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-12-2010, 05:58 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