+ Reply to Thread
Results 1 to 10 of 10

Merging data from multiple sheets into one sheet

  1. #1
    Registered User
    Join Date
    01-09-2014
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2007
    Posts
    5

    Merging data from multiple sheets into one sheet

    I have a workbook with 260 sheets. I need to combine the data from the same range from sheets 2 thru 260 with the data on sheet 1. Are there any easier ways to do that other than copying and pasting from each individual sheet?

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,688

    Re: Merging data from multiple sheets into one sheet

    Are you looking to combine them such as all the values in A1 from all sheets are added together in the master? Or are you looking to do something else? Your request is a little bit confusing.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    01-09-2014
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Merging data from multiple sheets into one sheet

    I am looking to add the data from A3 to D46 on sheets 2 thru 260 to sheet 1, below row 46 in sheet 1.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,688

    Re: Merging data from multiple sheets into one sheet

    I am still not sure of what you want. From your description, there are two scenarios that I can envision..
    1. Copy all the sheets and paste them consecutively in the master starting with Row 47. ie. Sheet 2 pasted to row 47, then paste sheet 3 below that.
    2. Combine the values of sheets 2 thru 260 beginning in row 47. ie. if A3 on sheet 2 is 10 and A3 on sheet3 is 15, and we only combined the two sheets the value in A47 would be 25.

    Which scenario are you trying to achieve.
    Item 1 requires a VBA solution, looping through each sheet and pasting.
    Item 2 can be achieved using the built in Excel functionality Consolidate which is found on the Ribbon.

    Please clarify.

  5. #5
    Registered User
    Join Date
    01-09-2014
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Merging data from multiple sheets into one sheet

    I am trying to achieve scenario 1.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,688

    Re: Merging data from multiple sheets into one sheet

    This code assumes that there is data in your "Master" sheet in cells A1 through A46 or at least the last cell holding data in column A is 46
    Try this:
    Please Login or Register  to view this content.
    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button
    Last edited by alansidman; 01-09-2014 at 11:34 AM.

  7. #7
    Registered User
    Join Date
    01-09-2014
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Merging data from multiple sheets into one sheet

    When I run the macro it simply copies the data from sheet 1, 259 times as opposed to copying sheets 2 thru 260. Could I be doing something wrong or could the code need adjusted?

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,688

    Re: Merging data from multiple sheets into one sheet

    My apologies. I double checked and tested my code. It had an error in it.

    This should work.

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    01-09-2014
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Merging data from multiple sheets into one sheet

    That worked. Thank you very much!

  10. #10
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,688

    Re: Merging data from multiple sheets into one sheet

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Merging Data from Multiple excel sheets to a Master sheet
    By dilli34 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-19-2013, 12:26 AM
  2. [SOLVED] Merging multiple sheets onto one master sheet
    By pompeydave in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-09-2012, 07:56 AM
  3. Merging: displaying which sheet data comes from when merging sheets
    By zed commander in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-12-2012, 12:20 PM
  4. Merging data from different excel sheets into one new sheet
    By MrCarembole in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2011, 07:31 PM
  5. merging data from multiple excel spread sheets
    By scotthawkey in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-16-2007, 11:31 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