+ Reply to Thread
Results 1 to 3 of 3

Conditionally Copy Cells from Multiple Sheets and Paste in Another Workbook

  1. #1
    Forum Contributor
    Join Date
    09-19-2004
    Location
    Canada
    Posts
    408

    Conditionally Copy Cells from Multiple Sheets and Paste in Another Workbook

    Hi all,

    This is a follow-up question to my original post:

    http://www.excelforum.com/excel-prog...-for-name.html

    I have been trying to create this macro on my own (as much as possible) but I just can’t get it to do what I want it to do, so I am asking for your help again.


    To expand on my first post in this thread, here is what I am trying to accomplished:


    I have a workbook, named ABC Packages, with four worksheets, named ABC2011, XYZ2011, ABC2012 and XYZ2012. All worksheets contain data from row 4 up to row 1515.

    Column S of sheets ABC2011 and ABC2012, and column W of sheets XYX2011 and XYZ2012 contain dates.

    I have another workbook, named ABC Reports, with a sheet (template), named Report. Rows 1 to 10 contain the report and columns headers; row 11 is blank; and row 12 contain other information.


    My task is to insert selected data from sheets ABC2011, XYZ2011, ABC2012 and XYZ2012 in the Report template between the header (row 10) and the other information (row 12).

    The criteria is:

    If the date in sheets ABC2011 (column S), XYZ2011 (column W), ABC2012 (column S) and XYZ2012 (column W) is in the specified date range, copy and paste the cells as follows, respectively:

    Copy from (sheet) ABC . . .: C, D, Q, R, Y, N, O, P

    Copy from (sheet) XYX . . . : H, I, P, Q, AC, S, T, U

    Paste to (sheet) Report: B, A, D, E, Z, AA, F, G


    The Start and End Dates of the Date Range should be user input.


    So far, this is what I created:

    Please Login or Register  to view this content.
    I am sure that this is not an efficient and correct way of writing the code so I would appreciate anyone's help.

    Thank you sincerely,
    Gos-C
    Last edited by Gos-C; 04-18-2012 at 11:37 AM.
    Using Excel 2010 & Windows 10
    "It is better to be prepared for an opportunity and not have one than to have an opportunity and not be prepared."

  2. #2
    Forum Contributor
    Join Date
    09-19-2004
    Location
    Canada
    Posts
    408

    Re: Conditionally Copy Cells from Multiple Sheets and Paste in Another Workbook

    Hi all,

    I have attached two sample files for further illustration. I will appreciate any help I can get.

    Thank you,
    Gos-C
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    09-19-2004
    Location
    Canada
    Posts
    408

    Re: Conditionally Copy Cells from Multiple Sheets and Paste in Another Workbook

    Here is the solution, compliments Tom Ogilvy at AllExperts:

    Please Login or Register  to view this content.
    Gos-C

+ 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