Excel Data Consolidation

A while back we had a situation where we had collected a set of information from various sources and wanted to get all of it into the same Excel Worksheet and I was asked if I could help. There were about 60 spreadsheets all with the same columns but with a variable number of rows and of course, different data. The requester had linked all 60-odd spreadsheets to a master Workbook and wanted to know how to get the information from each transferred to a single master sheet that he could share as a consolidated list. This process needed to be repeatable as the authors of the 60-odd different worksheets would update these regularly and he wanted to the master sheet to always have the latest information with minimal effort.

I showed him what to do using the data manipulation features of Excel 2016. In this article, I will walk through those steps using some made up information rather than what he was consolidating.

Example Set Up

For simplicity, I will not link each sheet to a source sheet as that is simple to do but instead have created 3 sheets each with some dummy information and put these in the same workbook. In the real world, the authors would not have access to the master workbook so they would edit their own data sheet which this workbook pulls in. As I don’t want to disclose the information he was consolidating, I will just use dummy contact details as shown below.

Excel Data Consolidation Example 01

Excel Data Consolidation Example 02

Excel Data Consolidation Example 03

I could have prepared this data into tables beforehand but it is not required as the following steps will convert the data range into tables. So, just for clarity, I have 3 sheets of contact details that I want to include in a dynamic master sheet. These contact details can change and if they do, I want to be able to refresh the master sheet rather than recreate it.

First we need to establish a data connection from the “Data” tab on the Excel ribbon, “From Table” in the “Get & Transform” section, as if these were tables.

Excel Data Consolidation Example 04

However, do not accept the range proposed by the dialog box asking where your data-table is, select all rows instead. When in that dialog box formula range, go to your sheet and starting from the first column drag the range to the last column including all rows so that in future newly added data will be included. Make sure you have a check mark in the headers (assuming you have column headers).

Excel Data Consolidation Example 05

The Power Query Editor will show but but we don’t want to include rows that are empty. Select “Remove Blank Rows” from the menu under “Reduce Rows” – “Remove Rows”. Then under the “Close & Load” menu select “Close & Load To”.

Excel Data Consolidation Example 06

When prompted select “Only Load Connection” and click the “Load” button.

Excel Data Consolidation Example 07

You will then see the Connections section opened up.

Excel Data Consolidation Example 08

Repeat the steps above for the other sheets so you have all the connections to each sheet that remove blank rows.

Excel Data Consolidation Example 09

Now for the summary sheet, where the magic happens, we need another query this time select an “Append” from the “Combine Queries” found on the “New Query” menu in the “Get & Transform” section of the “Data” tab. We are using Append because we are collating all rows of data, there are other options for different types of data joining.

Excel Data Consolidation Example 10

Select 3 or more when prompted.

Excel Data Consolidation Example 11

Then add the table query connections you created earlier by selecting them and clicking “Add”. When they are all showing on the right-hand panel, click “OK”.

Excel Data Consolidation Example 12

You will then see a preview of the data that will be included on the master sheet.

Excel Data Consolidation Example 13

This time when we close, we will load it to a destination sheet. As before “Close and Load To”. Then leave as the default, Table and New worksheet. Then click Load.

Excel Data Consolidation Example 14

You will see a new sheet created with your data. The Workbook Queries window will also be displayed with the new query name.

Excel Data Consolidation Example 15

Now when you add a row or change your data whenever you like and you can refresh that new Append query (or from anywhere on the master table).

Let’s do that.

Refreshing data

First I will make some changes to each sheet, I’ve added a new row of data on one, altered a row of data on another by adding a phone number and deleted a row of data on the last.

After all the adjustments have been made you can refresh all of the queries to feed your adjustments into the master sheet.

Excel Data Consolidation Example 16

Excel Data Consolidation Example 17

Excel Data Consolidation Example 18

From anywhere you can go to the Data tab, select “Refresh All” from the “Refresh All” menu. Alternatively, if you only want to refresh the summary you can go to the summary table and select “Refresh” from the same menu or press Alt+F5 on a Windows keyboard.

Excel Data Consolidation Example 19

You can see that the data for Gary Howells has been changed, Frank Edwards deleted and Zak Smith added.

Excel Data Consolidation Example 20

Examples Workbooks

I’ve included the workbook at it was at the start and the other as it was when finished. If you want to see the final outcome you can have a look at Excel Data Consolidation Finished Example, “Finished.xlsx“, but if you want to walk through this article step by step then you can use “Start.xlxs“.

Consolidating many Excel sheets into one master sheet

Leave a Reply