One of the most sought after query from the millions of Excel users around the world is:

How do I consolidate multiple Excel workbooks into one?

 

There are a couple of ways you can do this, using VBA or complex formulas but the learning curve is steep and out of reach for most Excel users.

Luckily with Power Query this consolidation task can be done in a couple of minutes!  That’s right, only a couple of minutes.

I show you how below…

DOWNLOAD EXCEL WORKBOOK

STEP 1: Create a New Folder on your Desktop or any directory and name it to whatever you like e.g. 2016 Sales

Move an Excel Workbook in this Folder that contains your Sales data e.g. January 2016.xlsx

move jan

 

STEP 2: Open a NEW Excel Workbook and go to Power Query > From File > From Folder

from folder

 

STEP 3: From the Folder dialogue box, click the Browse button

folder

This will bring up the Browse for Folder dialogue box and you need to select the folder you created in Step 1 and press OK

browse dor folder

 

STEP 4: This will open up the Query Editor.

From in here you need to select the first 2 columns (hold down the CTRL key to select) and Right Click on the column heading and choose Remove Other Columns

remove other columns

 

STEP 5: You need to go to Add Column > Add Custom Column

add custom column

 

STEP 6: This will bring up the Add Custom Column dialogue box.

In here you need to name the new column E.G. Import, and within the Custom Column Formula you need to enter the following formula:

= Excel.Workbook([Content])

This will import the workbooks from within the Folder that you selected in Step 3

add custom column2

 

STEP 7: You now have a new column called Import.

Click on the Expand Filter and select the Data box only and press OK.  This will import the workbook from the folder

import expand

 

STEP 8: Click on the Expand Filter from the Import.Data column and select OK.  This imports all the columns’ data from within the workbook

expand import 2

data import

 

STEP 9: Now it is time to transform the data by making some cosmetic changes!

Remove the Content column by Right Clicking and choosing Remove

remove binary

 

STEP 10: Select the Import.Data.Column1 and filter out the CUSTOMER heading and press OK.  This will also remove the other column’s headers

remove column headings

 

STEP 11: Select the Date column and go to Transform > Data Type > Date

data type date

 

STEP 12: Select the Sales column and go to Transform > Data Type > Currency

data type currency

 

STEP 13: Rename the column headings to whatever you like by double clicking on the column header, renaming and pressing OK

column rename

 

STEP 14: Go to File > Close & Load.

close & load

 

This will put the data into a new worksheet within your workbook

new sheet

 

STEP 15: You can now Insert a Pivot Table to do your analysis by going to Insert > Pivot Table > New/Existing Worksheet

insert pivot table

 

Put the Months in the ROWS and the Sales $ in the VALUES area:

pivot table1

 

STEP 16: NOW FOR THE COOL PART!!!!

You can move similar workbooks into the Folder we created in Step 1, say for subsequent months eg. February 2016.xlsx, March 2016.xlsx etc

NB: The Excel Workbooks have to have the same format and number of columns as in the workbook we imported in Step 1

move subsequent months

 

STEP 17: In your Excel workbook, click on the imported data and this will open up the Workbook Queries pane (If this does not open, go to Power Query > Show Pane)

Click the Refresh button (or you can go to Table Tools > Query > Refresh)

refresh pane

 

STEP 18: This will import the February 2016.xlsx and March 2016.xlsx data into the Excel workbook and append it to January’s data

feb data

STEP 19: Now you can Refresh the Pivot Table and the new imported data will be reflected

updated pivot

 

Next month all you have to do is drop in the new month’s workbook into the 2016 Sales Folder and Refresh the Query & the Pivot Table to see the results!

THAT IS POWER!!!!

Consolidate Multiple Excel Workbooks2

HELPFUL RESOURCE:

PIVOT BANNER

If you like this Excel tip, please share itEmail this to someone

email

Pin on Pinterest

Pinterest

Share on Facebook

Facebook

Tweet about this on Twitter

Twitter

Share on LinkedIn

Linkedin

Share on Google+

Google+

Related Posts

How To Install Power Query in Excel 2010   Power Query is a new add-in that was introduced in Excel 2013 by Microsoft and was that popular that they made it backward compatible with Excel 2010. CLICK TO SEE THE TUTORIAL ON HOW TO INSTALL POWER QUERY IN EXCEL 2013   So what is Power Query? We...
Split First & Last Name Using Power Query There are times when you receive a data set of employee full names in one column and you want to separate the full name into first name and surname in separate columns. This is a common task and most people may refer to complex formulas to do this and waste lots of time in the...
Replicating Excel’s RIGHT Function with M in... Power Query lets you perform a series of steps to transform your Excel data. There are times when we want to do things that are not built in the user interface. This is possible with Power Query's programming language, which is M. Unfortunately not all of Excel's formulas can ...
Install Power Query With Excel 2013 Power Query is a new add-in that was introduced in Excel 2013 by Microsoft and was that popular that they made it backward compatible with Excel 2010. Read the tutorial on how to install Power Query in Excel 2010 here So what is Power Query? Well you know when you get data f...