+ Reply to Thread
Results 1 to 9 of 9

Macro to copy data rows to a summary worksheet if the row satisfies a condition

  1. #1
    Registered User
    Join Date
    12-03-2012
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2003
    Posts
    2

    Macro to copy data rows to a summary worksheet if the row satisfies a condition

    I have a project where I need to copy entire lines of data from multiple worksheets into one worksheet if a certain condition is met within that row.

    I have included a test file that contains an example of what I aim to achieve.

    In the test file I want to copy every line from worksheet Jan12, Feb12, Mar12 to NoCusip12 IF there is no data in column C.

    My actual file will have more worksheets and also more columns, but I can't include my actual file due to sensitivity of the data.

    Any help would be great!

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Macro to copy data rows to a summary worksheet if the row satisfies a condition

    This should do it

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to copy data rows to a summary worksheet if the row satisfies a condition

    Another option

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to copy data rows to a summary worksheet if the row satisfies a condition

    Another option

    Please Login or Register  to view this content.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to copy data rows to a summary worksheet if the row satisfies a condition

    And yet another:

    Please Login or Register  to view this content.
    Change the "C" (in red) to whatever your last column actually is!
    Last edited by xladept; 12-03-2012 at 07:48 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  6. #6
    Registered User
    Join Date
    12-03-2012
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Macro to copy data rows to a summary worksheet if the row satisfies a condition

    Thanks for the help everyone! I got it figured out.

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to copy data rows to a summary worksheet if the row satisfies a condition

    You're welcome!

  8. #8
    Forum Contributor
    Join Date
    11-05-2012
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    107

    Re: Macro to copy data rows to a summary worksheet if the row satisfies a condition

    Hello cfr,

    Can you please, if possible, attach the workbook with the solution you adopted?

    Thank you

  9. #9
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to copy data rows to a summary worksheet if the row satisfies a condition

    Naja,
    There are two codes and you also have attached sheet where you can test it yourself. All you have to do is copy the codes and put them in the module and see how they work.

+ 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