+ Reply to Thread
Results 1 to 5 of 5

Consolidate 30 sheets into one sheet. very few sheets have one or more extra columns.

  1. #1
    Registered User
    Join Date
    09-22-2010
    Location
    US
    MS-Off Ver
    O365 (PC) V 2308
    Posts
    62

    Consolidate 30 sheets into one sheet. very few sheets have one or more extra columns.

    Is there a function or macro to consolidate multiple sheets into one sheet? I searched and found the data- consolidate feature but for that I have to go into each sheet select the range. Two or three sheets have extra columns as well as they start in line 3 instead of row two. One sheet have 750 records, one sheet has 5 records soon...

    It's one time process so don't want to spend too much time on programming.

    Any thoughts

    Thank you.
    Last edited by mls_newbee; 07-28-2023 at 06:06 PM.

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Consolidate 30 sheets into one sheet. very few sheets have one or more extra columns.

    See if this macro version does what you need :

    Paste all of the following into a routine module ....


    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,885

    Re: Consolidate 30 sheets into one sheet. very few sheets have one or more extra columns.

    Look at this video on Power Query Consolidation.

    https://www.youtube.com/watch?v=HcfKOusOJhA
    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

  4. #4
    Registered User
    Join Date
    12-22-2022
    Location
    California
    MS-Off Ver
    2016
    Posts
    21

    Re: Consolidate 30 sheets into one sheet. very few sheets have one or more extra columns.

    Hi,

    Open your VBA Editor and click on Insert and choose Module.
    In the new module window, paste the following code-

    Please Login or Register  to view this content.
    and then close the VBA editor.
    then press Alt+F8 and select the "ConsolidateSheets" macro from the list and Run it.

    This code will create a new sheet named "ConsolidatedSheet" and copy all data (excluding the header row) from each sheet (except the "ConsolidatedSheet" itself) in your workbook into the new sheet. The macro will also delete the first sheet (Sheet1) after the consolidation, but you can comment out or remove that part if you want to keep it.


    Note- organize your data in a similar structure on each sheet for the code to work properly.

    Best Regards.
    Last edited by AliGW; 08-01-2023 at 03:41 AM. Reason: Code tags added - please review the forum rules.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Consolidate 30 sheets into one sheet. very few sheets have one or more extra columns.

    @Chris5

    Please review the forum rules on code tags. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Consolidate some sheets to a new sheet through VBA
    By aparnawangu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-27-2018, 11:01 AM
  2. How to consolidate two sheets with an extra column
    By amartino44 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-15-2018, 12:22 AM
  3. cut and paste and navigating betwwen sheets and deleting extra sheets
    By bmbalamurali in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-10-2014, 01:13 PM
  4. Replies: 2
    Last Post: 12-24-2012, 02:31 PM
  5. Copy Extra Columns When copying Sheets
    By aftabn10 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-01-2011, 08:10 PM
  6. Consolidate several sheets into one sheet using VBA
    By mkvassh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2011, 01:24 PM
  7. duplicating text into columns in extra sheets
    By neiljb in forum Excel General
    Replies: 1
    Last Post: 11-13-2009, 05:16 PM

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