+ Reply to Thread
Results 1 to 13 of 13

Copy Multiple sheet data into Master sheet using VBA

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Post Copy Multiple sheet data into Master sheet using VBA

    I have four Sheets with the below info:

    Worksheet 1:
    A1: Name B1:aaa
    A2: Place B2:bbb
    A3: Animal B3:ccc
    A4: Thing B4:ddd

    All the sheet has only two column of data and Column A has heading in four rows. Only the column 2 changes in each work Sheet.

    How do I get this into the master Sheet with each sheet info on next column. Please See below what I want

    A1: Name B1:aaa(from Sheet1) C1:asd(from Sheet2)
    A2: Place B2:bbb(from Sheet1) C2:dff(from Sheet2)
    A3: Animal B3:ccc (from Sheet1) C3:cjd (from Sheet2)
    A4: Thing B4:ddd (from Sheet1) C4:tyu (from Sheet2)

    etc. Can you please help. Thanks!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,995

    Re: Copy Multiple sheet data into Master sheet using VBA

    Shouldn't be difficult.

    Please post a sample workbook with some typical data.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-10-2013
    Location
    NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Copy Multiple sheet data into Master sheet using VBA

    Hi Please see the sample excel file here.
    Attached Files Attached Files

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Copy Multiple sheet data into Master sheet using VBA

    Will the Master tab already have column A populated or should it be done by the macro?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  5. #5
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Copy Multiple sheet data into Master sheet using VBA

    Hi
    Check this out:

    Master Document.xlsm
    Click *, if my suggestion helps you. Have a good day!!

  6. #6
    Registered User
    Join Date
    01-10-2013
    Location
    NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Copy Multiple sheet data into Master sheet using VBA

    Hi Thanks for this... It works great! However need a small tweak.

    If I change the worksheet names it is not working. For eg: if I change the name of 'Sheet1' to 'Sheet5' it is not working. Can you pls help me with code that will work with any sheet names. Thanks a lot again for your help!

  7. #7
    Registered User
    Join Date
    01-10-2013
    Location
    NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Copy Multiple sheet data into Master sheet using VBA

    Quote Originally Posted by arlu1201 View Post
    Will the Master tab already have column A populated or should it be done by the macro?
    Hi Arlette, I can copy column A and paste. If other columns are pasted that would do for me!

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

    Re: Copy Multiple sheet data into Master sheet using VBA

    Try this one

    Please Login or Register  to view this content.

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

    Re: Copy Multiple sheet data into Master sheet using VBA

    If you wish to copy "A"

    Please Login or Register  to view this content.
    Last edited by AB33; 01-11-2013 at 12:59 PM.

  10. #10
    Registered User
    Join Date
    01-10-2013
    Location
    NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Copy Multiple sheet data into Master sheet using VBA

    Thank YOu - This is working great! exactly what i wanted:-) Have a nice day.

  11. #11
    Registered User
    Join Date
    01-10-2013
    Location
    NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Copy Multiple sheet data into Master sheet using VBA

    Quote Originally Posted by AB33 View Post
    If you wish to copy "A"

    Please Login or Register  to view this content.
    THis is not working as good as the previous one. It copies Col A to all other column... Not the data.

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

    Re: Copy Multiple sheet data into Master sheet using VBA

    Vathsan,
    You are welcome!
    Please close this thread as solved. Go to the top right hand side of this page, choose, solved from the "Thread Tools" drop down menu.

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

    Re: Copy Multiple sheet data into Master sheet using VBA

    I have now corrected post # 9 as per your request
    Last edited by AB33; 01-11-2013 at 01:12 PM.

+ 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