+ Reply to Thread
Results 1 to 19 of 19

Macro to consolidate all the data into single file

  1. #1
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104

    Macro to consolidate all the data into single file

    Hi team,

    I am having an Excel sheet having each data in a separate tab. I want to consolidate the data in different tabs, to generate a consolidated file.

    Can anyone please help me to create a macro which consolidate excel files.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (24 H2) 64 Bit
    Posts
    1,187

    Re: Macro to consolidate all the data into single file

    Try this;

    Please Login or Register  to view this content.
    .
    Last edited by Haluk; 08-01-2019 at 01:24 PM.

  3. #3
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104

    Re: Macro to consolidate all the data into single file

    Hi Thank u. I will try. Do I need to create a button or how do I execute the code.

  4. #4
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104
    Hi can you please let me know how to execute the code.
    Last edited by AliGW; 08-04-2019 at 01:22 AM. Reason: Please don't quote unnecessarily!

  5. #5
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104
    Team can anyone please help me out !!!

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Macro to consolidate all the data into single file

    How do you want the result?

  7. #7
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104

    Re: Macro to consolidate all the data into single file

    Hi I need the data which is the separate tab in the Excel sheet should be converted into a single Excel file.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Macro to consolidate all the data into single file

    Just copy full range form each worksheet including each header?

    "Consolidate" is just too rough to explain.

  9. #9
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104

    Re: Macro to consolidate all the data into single file

    I apologise. Header should be copied once and the remaining data in the tab should be copied into a single Excel file.

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Macro to consolidate all the data into single file

    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104

    Re: Macro to consolidate all the data into single file

    Hi thanks. I apologise I am new to vb. Can u tell me how to execute this code. And also if I add any new columns in the sheet, should that need to be declared in the code.

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Macro to consolidate all the data into single file

    1) Hit Alt + F11 to open VBE(Visual Basic Editor)
    2) [Insert] - [Module]
    3) Paste the code on to the right blank space and hit Alt + Q to get back to Excel
    4) Hit Alt + F8 and select "test" then Run

  13. #13
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104
    Hi thanks I did try it. But after running I am not seeing the consolidated file.can u check where I am going wrong.
    Attached Files Attached Files
    Last edited by AliGW; 08-04-2019 at 02:21 AM. Reason: Please don't quote unnecessarily!

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Macro to consolidate all the data into single file

    The new FILE(workbook) should be saved in the same folder.

  15. #15
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104

    Re: Macro to consolidate all the data into single file

    Just tried it works perfect buddy. Thanks a lot. I have one last doubt. If I have the same data in separate excel will the same code works to consolidate into a single file.

    Currently the test file I have here is the data in a separate tab but now my question is if the same data is in a separate excel file does the same code works to consolidate

  16. #16
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Macro to consolidate all the data into single file

    Simply NO.

    It's a completely different question.

  17. #17
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104

    Re: Macro to consolidate all the data into single file

    Oh ok. So do we need to write a code for that as well. I would need that also. If you could help me that would be great.

  18. #18
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Macro to consolidate all the data into single file

    You need to open a new thread for your new question.

    If your original question is solved, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  19. #19
    Forum Contributor
    Join Date
    04-24-2019
    Location
    Chennai
    MS-Off Ver
    MS office 2007
    Posts
    104

    Re: Macro to consolidate all the data into single file

    Yea thanks jindon. I will open a new thread.

    I really appreciate all your efforts to solve my query.

+ 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. Need help to consolidate data for 20 users in a team to a single file
    By softpuneet in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2019, 04:39 PM
  2. Consolidate data from multiple excel files into single file
    By hkkk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2013, 03:34 AM
  3. Consolidate data from multiple excel files into single file
    By hkkk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-22-2013, 12:36 AM
  4. Replies: 20
    Last Post: 06-20-2013, 09:04 AM
  5. Macro to consolidate data for varying range of sheets within a file
    By Ashali in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-30-2013, 05:24 AM
  6. Need macro to consolidate data from different sheets to single sheet
    By sekharyadav in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-18-2012, 03:20 AM
  7. Macro to consolidate many workbooks to a single worbook/sheet
    By Greed in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-05-2012, 02:49 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