Results 1 to 6 of 6

Macro to use multiple IF statements to copy and paste to dif places of a dif worksheet

Threaded View

  1. #1
    Registered User
    Join Date
    05-16-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2011
    Posts
    6

    Macro to use multiple IF statements to copy and paste to dif places of a dif worksheet

    [EDIT] Completely new text ahead

    Hey guys,

    I posted about this before, but I went into a long-winded confusing explanation and I felt maybe I'll have better luck with some pseudo-coding.

    Basically this is how I'd like it to run:

    Any cells in B3:B26 that = "1G", then copy that entire row (which goes A:Q), and paste it into the A2 of a different worksheet called "ToPrint".

    Then, any cells in B3:26 that = "2T", then copy that entire row, into the same ToPrint worksheet, 3 cells down from the last row from the previous condition (i.e. "1G"). For example, if previously, the "1G" condition came up with 9 results, taking up A2:Q10 in "ToPrint", I want the "2T" condition to paste into "ToPrint" worksheet as well, and to paste it starting from A13 (leaving a 2 blank-cell gap between the 1Gs and 2Ts).

    Then the exact same thing for 2 more conditions, "3D" and "4W" also having a 2 cell gap between the pasted results.

    These 4 conditions results would replace whatever was in the ToPrint worksheet before as I'm going to be running this macro from 8 different sheets.

    Thank you so much for any and all help I receive. If you have any questions please feel free to ask.

    - Pat

    If you can't get the attachment, here it is on google docs. I've added what I'd like the ToPrint to look like (last sheet).

    PS: as an absolute bonus (not make or break), I'd like the the text that is in cell A1 of the sheet I run the macro off, to also be copied to the A1 of the "ToPrint" worksheet.
    Attached Files Attached Files
    Last edited by pato88; 05-18-2013 at 03:16 AM. Reason: Changed everything to be clearer and more helpful

Thread Information

Users Browsing this Thread

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

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