+ Reply to Thread
Results 1 to 6 of 6

CODE for COPYING rows according to specified CRITERIA and paste it to another workbook

  1. #1
    Registered User
    Join Date
    08-18-2013
    Location
    manila
    MS-Off Ver
    Excel 2003
    Posts
    3

    CODE for COPYING rows according to specified CRITERIA and paste it to another workbook

    Hi Everyone,

    I have 2 workbooks namely Masterlist.xlsx and REGULAR.xlsx both have the sheet named LIST with the following formats

    A B C D E
    1 EMPLOYEE NUMBER NAME LOCATION DATE OF HIRE STATUS
    2 123578 Michael Jordan New York 01/18/11 Regular
    3 321666 Kobe Bryant LA 02/31/13 Prob


    What I want to do is to copy A2:E2 from the Masterlist.xlsx if the value of E2 is "Regular" or blank. Then paste it to the workbook REGULAR.slxs at the bottom row so I wont overwrite existing data. Additionally, I dont want to paste rows that was already pasted after rerunning the code multiple times.

    I badly need your help.

    Thanks a lot!

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: CODE for COPYING rows according to specified CRITERIA and paste it to another workbook

    This may work for the first part.

    Please Login or Register  to view this content.
    If Masterlist is continuously compiled and REGULAR can be cleared before pasting it can be modified to handle the second part is well.

  3. #3
    Registered User
    Join Date
    08-18-2013
    Location
    manila
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: CODE for COPYING rows according to specified CRITERIA and paste it to another workbook

    John,

    That works good to me.

    But is there a way I dnt need to use filter? Everytime it paste I just want the code to check if the row containing the data is already existing on the REGULAR.xlsx. If it does it shoudnt paste anymore and proceed to the next row until the last row.

    Thank your John I appreciate your help!

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: CODE for COPYING rows according to specified CRITERIA and paste it to another workbook

    Sorry, I didn't get back to you sooner. If there's a match for Employee ID in REGULAR will that mean not to copy? Also can you attach a sample file?

  5. #5
    Registered User
    Join Date
    08-18-2013
    Location
    manila
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: CODE for COPYING rows according to specified CRITERIA and paste it to another workbook

    John,

    Sorry the file is too huge.

    I mean the entire row John. If the rows from (Masterlist.xlsx) that is to be copied is already existing in the REGULAR.xlsx it shouldn't copy that row anymore. Its like omitting the rows or not copying the rows that already exist in the Masterlist.xlsx.

    Thanks JOHN.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: CODE for COPYING rows according to specified CRITERIA and paste it to another workbook

    Maybe:

    Please Login or Register  to view this content.

+ 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] Copying worksheet from another open workbook using variables, paste to active workbook
    By sanpedro_nz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-08-2012, 08:25 AM
  2. [SOLVED] Copying specific rows from an open workbook into the next row of a closed workbook.
    By Deimola in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-05-2012, 12:59 PM
  3. Copying specific data if criteria is met from workbook to workbook
    By slyolfox in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-04-2011, 12:36 PM
  4. VBA Code to Cut and Paste rows of data depending on criteria
    By Erik88 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-06-2011, 03:03 PM
  5. code required to copy and paste rows matching a criteria.
    By Duguid1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-30-2008, 04:49 AM

Tags for this Thread

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