+ Reply to Thread
Results 1 to 4 of 4

appending multiple workbooks with same headers

  1. #1
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    appending multiple workbooks with same headers

    I literally have 100 workbooks with the same header, is there any way to just put everything together in one .xls file? *except copy/paste
    I got the idea of building a macro that copies the content but pasting it is a different matter, I can't get the macro to paste the content on the next blank cell everytime I need to add content.
    I'll attach two sheets for exemplification.
    TY in advance.
    Attached Files Attached Files
    Last edited by bibu; 03-13-2014 at 03:23 AM.

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: appending multiple workbooks with same headers

    Hi, this code will do the job, yet, you need to adjust the proper directory for the files and create the "consolidated.xlsx" and list all the desired filenames in sheet2

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: appending multiple workbooks with same headers

    Thank you for the reply. I don't fully understand the code, but I think I have made a confusion, I'm sorry.
    As I said before, there are 100 worksheet (different .xls files) that have the same header and the same structure (only the first sheet "OnCourt" contains data) and I would like to move all their data in a single ("consolidated" as you say) sheet.
    Now, considering that all the files (both the "consolidated.xls" and the other files) are in the same folder, I'll show you what happens when I try to run your code.
    - Note that I'm modifying "On Court" to "OnCourt" since that's the name of the sheet.
    I think I'm doing something wrong or I didn't explain myself correctly in the first post.
    https://dl.dropboxusercontent.com/u/...306_111944.mp4

    Sorry if file takes too long to load, it has 20 MB.
    Basically I get
    "Compile error
    Function call on left-hand side of assignment must return Variant or Object"
    Last edited by bibu; 03-06-2014 at 05:34 AM.

  4. #4
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: appending multiple workbooks with same headers

    Maybe this should be moved to VBA/Macro, since I've seen similar threads in that category.

+ 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. Merge Multiple Excel Workbooks and Map Headers
    By mdrouin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-26-2013, 11:08 AM
  2. Appending column headers to each row
    By avalerion in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-11-2013, 04:11 PM
  3. Appending many different xls files with the same headers to one master file
    By setsanto in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-16-2013, 09:03 AM
  4. VBA to merge multiple Workbooks with multiple sheets retaining headers
    By LauraN1 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 08-19-2010, 03:47 PM
  5. Replies: 0
    Last Post: 08-16-2006, 11:15 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