Merging and combining multiple workbooks into a master workbook in excel is easier than ever. It takes 2 minutes to prepare and a few seconds to merge. Don’t believe me? Click.
There are times when we must take into account several workbooks. For example, you are preparing a quarterly report. Now for the first quarter, you must consider the data from January, February, March, and April. Now if you keep data on a monthly basis, you need to merge those four files into one workbook for a better report. Of course, you can just open each workbook and copy all the data to a new workbook. For four workbooks, this could be done, but what about 400 workbooks? Would you be able to manually merge those Excel files into one?
That’s insane. You must need an automated solution for that. In this tutorial I’ll show you how you can combine multiple excel workbooks into one automatically. I’ll be using VBA for this, and by clicking a button, you’ll be able to combine tons of workbooks at once. Don’t worry, you don’t need to be an expert on VBA to do this. Everybody can do this if they follow the below procedure.
Click on the developer tab. If you don’t have the developer tab on the ribbon, please check this video.
Click on visual basics.
Click "insert" and then "module."
Now write the code and please click on the link below to get the code.
Once you’ve setup the code, click on the run button. Done! All the workbooks from the folder are combined.
Things you need to consider while using the code.
1. You need to write the file path where you have files to be merged, inside the code.
2. After the file path, you must write a backward slash ( \ )
3. If you want to use the code again, then you need to save the workbook in .xlsm format.
Pro tip: If you need to combine excel files frequently, you can create a button for that. All you need to do is follow this advanced Excel tutorial and then save the workbook with the code. There are three ways to create a button to run a code and you can use any of them. The tutorial links are as follows:
1. How To Create A Custom Button On Quick Access Toolbar To Run VBA
2. How to Create a Button to Run VBA Code
3. How to Create Floating Buttons in Excel to Run VBA
Thanks a million for being here. Support us by becoming a Patron and leave a comment if you have any questions. Subscribe to our YouTube Channel for awesome tutorials on excel.