+ Reply to Thread
Results 1 to 8 of 8

Macro to copy data from 3 different worksheets with different columns and rows of data

  1. #1
    Registered User
    Join Date
    05-08-2014
    Location
    glasgow
    MS-Off Ver
    Excel 2007
    Posts
    4

    Post Macro to copy data from 3 different worksheets with different columns and rows of data

    Hi

    Its been a while since I've done any VBA and to say I'm rusty is an understatement!! I'd be grateful for a bit of assistance in solving, what I'm pretty sure is a really easy syntax solution.
    I have a spreadsheet with 3 worksheets of data. Each of the worksheets represents a 'stage' in a process, Identify, Assess, Funnel. I need to be able to view all the data from the 3 sheets in one worksheet. There are common fields across all 3 worksheets but data needs to be excluded from some columns on each worksheet and each worksheet will have a different volume of data in it.
    Here's what I've managed to cobble together thus far, only relating to the 1st tab of the spreadsheet -

    Please Login or Register  to view this content.
    It works o.k. until the 'do until' statement. I'm unable to think how to fix it and to ensure that it will pick up the next row of data and stop once all rows have been copied over.
    Can any of you clever people help me with this problem? Many thanks in advance.
    Last edited by arlu1201; 05-08-2014 at 06:15 AM. Reason: Use code tags.

  2. #2
    Valued Forum Contributor Miroslav R.'s Avatar
    Join Date
    05-16-2013
    Location
    NMnV, Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    479

    Re: Macro to copy data from 3 different worksheets with different columns and rows of data

    Hi Louise,

    pls upload sample workbook.

    Regards

    M

  3. #3
    Registered User
    Join Date
    05-08-2014
    Location
    glasgow
    MS-Off Ver
    Excel 2007
    Posts
    4

    Smile Re: Macro to copy data from 3 different worksheets with different columns and rows of data

    Hi

    Spreadsheet attached. Any help greatly appreciated!

    Many thanks
    Louise
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor Miroslav R.'s Avatar
    Join Date
    05-16-2013
    Location
    NMnV, Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    479

    Re: Macro to copy data from 3 different worksheets with different columns and rows of data

    Hi,
    only one check before I start:
    Rows on your 3 sheets are unique without any duplicates between sheets and you want only copy data form those 3 sheets in to one summary sheet?

    M

  5. #5
    Registered User
    Join Date
    05-08-2014
    Location
    glasgow
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Macro to copy data from 3 different worksheets with different columns and rows of data

    Hi

    Yes, that is correct. Each row is holds unique data and want to combine into one summary sheet. I only specific fields from each spreadsheet but I think I can handle that!
    Also, on one other thing which you might be able to help me with - how can I create a new field for each sheet called 'status'. This should relate to the sheet that the data was taken from. For example, data on the identify page should have a new field inserted in column a called 'identify', assess sheet should have new field called 'assess', and so on. is that possible?

    Really appreciate your help with this!

  6. #6
    Valued Forum Contributor Miroslav R.'s Avatar
    Join Date
    05-16-2013
    Location
    NMnV, Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    479

    Re: Macro to copy data from 3 different worksheets with different columns and rows of data

    Hi Louise,

    pls have a look at attached file.
    Go to summary sheet and click the 'Merge' button in cell 'A1'.

    Works fine on the sample You uploaded, but needs to be tested on larger sample just to be sure if everything is correct.

    Pls do also cross-check if all data are merged to sum sheet correctly (You decided not to copy all columns to sum sheet -'Item Type', 'Path'...)- you know why.

    STATUSREPORT.xlsm

    Source sheet name is in column A...

    So I hope you will be satisfied... :-)

    Regards

    M

  7. #7
    Registered User
    Join Date
    05-08-2014
    Location
    glasgow
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Macro to copy data from 3 different worksheets with different columns and rows of data

    Wow! Thank you so much. Really appreciate it.

  8. #8
    Valued Forum Contributor Miroslav R.'s Avatar
    Join Date
    05-16-2013
    Location
    NMnV, Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    479

    Re: Macro to copy data from 3 different worksheets with different columns and rows of data

    ... happy... ;-)

    Do not forget to close this thread and add reputation if You want...

    Have a nice day

    M

+ 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. Macro to copy data from specific columns and rows to new worksheet.....
    By dleckie in forum Excel Programming / VBA / Macros
    Replies: 35
    Last Post: 05-19-2014, 10:16 PM
  2. Macro copy data range from individual worksheets to new rows in consolidated worksheet
    By bushpotato in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2013, 01:24 AM
  3. Missing data after copy rows data from different worksheets
    By christeen00 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2013, 04:39 AM
  4. [SOLVED] Macro to copy formula to all rows that contain data in columns A:C
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2006, 10:45 PM
  5. Replies: 1
    Last Post: 02-27-2006, 11:40 AM

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