+ Reply to Thread
Results 1 to 6 of 6

Macro to combine several excel files

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    2

    Macro to combine several excel files

    I have 30 or so excel files, each has one sheet called "O10" with a variable number of rows but the same name and number of columns. All of the files are saved in one folder "C:Temp" and I would like to run a macro in a blank workbook that will take the data from all of the files and merge it into one sheet within one file. I have looked around the internet and found several solutions posted but can't seem to get any of them to work with various errors, this might be because I am using Excel 2010, or perhaps because none of the 30 files are macro enabled, I would appreciate any help with getting a code to solve my issue. Thank you!

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: Macro to combine several excel files

    Perhaps a macro like this would be of help?

    Please Login or Register  to view this content.
    This will extract info only from files ending with ".xlsx"

    Alf

  3. #3
    Registered User
    Join Date
    01-10-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Macro to combine several excel files

    Thanks Alf, I pasted the code in and although when the code is run it doesn't kick out an error it also doesn't result in the desired outcome, my new workbook that i opened and pasted the code in which is meant to accumulate results remains blank even after the macro ran

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: Macro to combine several excel files

    Rerading your description of the problem you say
    each has one sheet called "O10"
    so I now realise that each file have several worksheets. So change
    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    and see if that works better.

    Alf

  5. #5
    Registered User
    Join Date
    09-17-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Macro to combine several excel files

    may i get code for combine many excel to 1 excel and can i use this code for this situation?

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: Macro to combine several excel files

    Hi rotiplanta

    Welcome to the forum!

    I'm sorry but by posting in another forum member’s thread you have broken forum rule #2 so I'll not help you in this thread.

    Forum rule 2: Don't post a question in the thread of another member -- start your own.
    So start a new thread and I'm sure you will get help with your problem. If you also upload a file showing your data and how you wish to combine it then forum members will find it easier to help you.

    Alf
    Last edited by Alf; 01-16-2013 at 02:28 AM.

+ 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