• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Using VBA scripts to Combine multiple workbooks

ie6799u

New Member
I am a beginner to Excel and VBA, can somebody show me a few lines of scripts and instructions how to use VBA scripts to combine multiple Excel xls Files (which contain three worksheet) into a single Excel file.

Note:
All Excel files are stored in same folder.

Can somebody also suggest a good book with examples I can start to learn to solve these kinds of problems?
Thanks very much
 
@ie6799u
Why You don't do it manually?
1) Open 'new workbook'
2a) Open Your 'ready workbook'
2b) Copy sheet-by-sheet to Your 'new workbook'
2c) Close Your 'ready workbook'
3) Repeat steps 2a - 2c still two times
or
do You need to do that procedure daily ... many times?
 
Hi Mate,
I can do it manually, but we'll get minimum of 20 workbooks.
Means 20*3 sheets I have to copy manually.
There is a chance of miss and time consuming.
Monday and Friday we need to do this task.
That's why I requested a macro to automate.
 
For me,
You should have a list of those ~20 workbooks,
which You would like to combine to one workbook.
.. or as Marc L just comment above.
 
Hi Vletm,
I need to combine all the 20 workbooks.
So, in the Consolidate Workbook it should be
Book1/Sheet 1 -> Consolidate/Sheet1
Book1/Sheet2 --> Consolidate/Sheet2
Book2/Sheet1 --> Consolidate/Sheet1(Means next line of the Book1/Sheet 1 End line)
And so on...

@Marc,
Thanks for the link.
When I checked here, got the same macro.
The macro is copying only the first sheet or active sheet from the source file.
As I'm new, I don't know how to get the rest of the sheets.
If you help me, that would be great..

Thanks a lot
 
@Marc,

I need a small favour...
As per the link you provided, we have to mention a range every time.
But how do I know the range? It will differ from each sheet rite?
Any chance to find the automatically?
 
Back
Top