+ Reply to Thread
Results 1 to 8 of 8

Copy rows from multiple worksheets based on criteria in column

  1. #1
    Registered User
    Join Date
    09-10-2014
    Location
    Croatia
    MS-Off Ver
    2010
    Posts
    5

    Copy rows from multiple worksheets based on criteria in column

    Hi everybody!

    I have searched all over forums and I cannot find answer that matches my criteria closely enough so I could adapt the code to my need as I am total beginner.

    I have Workbook with multiple sheets and I want to search through all the sheets and copy rows assigned to each persons name to worksheet with that same person's name. Each sheet has assigned different people according to their name put in column E, and I want to have separate sheet for each person that copies all corresponding data.

    I.e. I want to copy all John's tasks from all sheets into sheet John etc. Simplified example of my table attached. Thank you!!

    sample.xlsx

  2. #2
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Copy rows from multiple worksheets based on criteria in column

    Hi Slavica

    Try this

    Please Login or Register  to view this content.
    Edit: this is assuming you have a sheet for every existing name
    +++ If I helped please add reputation +++

  3. #3
    Registered User
    Join Date
    09-10-2014
    Location
    Croatia
    MS-Off Ver
    2010
    Posts
    5

    Re: Copy rows from multiple worksheets based on criteria in column

    Thanks. I get Run-time error '9' Subscript out of range

  4. #4
    Registered User
    Join Date
    09-10-2014
    Location
    Croatia
    MS-Off Ver
    2010
    Posts
    5

    Re: Copy rows from multiple worksheets based on criteria in column

    Found one name missing. But now it seems it has copied only from one sheet- currently opened and it has copied it more times?

  5. #5
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Copy rows from multiple worksheets based on criteria in column

    Quote Originally Posted by Slavica View Post
    Thanks. I get Run-time error '9' Subscript out of range
    That's strange, I ran it in your sample workbook and it worked fine.

    Try it with the attached document here slavica.xlsm, all I have done is pasted my code into your workbook.

  6. #6
    Registered User
    Join Date
    09-10-2014
    Location
    Croatia
    MS-Off Ver
    2010
    Posts
    5

    Re: Copy rows from multiple worksheets based on criteria in column

    Yes it works fine on yours, but I probably am assigning something wrong with the macro? Here is my file working version with your macro that I ran.

    Plan novi po projektima_bez passa.xlsm

  7. #7
    Registered User
    Join Date
    09-10-2014
    Location
    Croatia
    MS-Off Ver
    2010
    Posts
    5

    Re: Copy rows from multiple worksheets based on criteria in column

    Sorry found error, I must delete additional data when there are some empty rows in between- that is delete empty rows. Works fine now, thank you!!

  8. #8
    Registered User
    Join Date
    01-20-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Copy rows from multiple worksheets based on criteria in column

    Quote Originally Posted by Slavica View Post
    Sorry found error, I must delete additional data when there are some empty rows in between- that is delete empty rows. Works fine now, thank you!!
    No problem Please mark the thread as solved, and if you are feeling kind you can give me reputation

+ 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 column data from multiple worksheets to single worksheet based on header criteria
    By nateaskins in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 03-21-2014, 10:42 AM
  2. Macro to copy rows from multiple worksheets based on criteria in range
    By guidovdn in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-14-2013, 01:21 PM
  3. copy rows from multiple worksheets to a new condition based on criteria
    By TheVoodoo in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-20-2012, 02:37 PM
  4. [SOLVED] Copy data across multiple worksheets (based on three criteria)
    By yunesm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-17-2012, 12:53 AM
  5. Consolidate rows from multiple worksheets in one based on cell criteria
    By SuperSman in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-11-2011, 10:28 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