Skip to main content

Consolidate Data with Excel built in feature


There are two  consolidation tools in Excel.

 You have three data sets. Each has names down the left side and months across the top. Notice that the names are different, and each data set has a different number of months.

This is the first of three data sets to be consolidated. Names appear in A2:A7. Columns across the top are the months Jan, Feb, and Mar.

Data set 2 has five months instead of 3 across the top. Some people are missing and others are added.

Some names in column A are the same as the previous image, but some are new. There are now five months across the top: Apr, May, Jun, Jul, and Aug.

Data set 3 has four months across the top and a few new names.

The final data set has months Sep, Oct, Nov, Dec. Again, names in column A. Some are repeated and some are new.

The Consolidate command will join data from all three worksheets in to one worksheet.


You want to combine these into a single data set.

The first tool is the Consolidate command on the Data tab. Choose a blank section of the workbook before starting the command. Use the RefEdit button to point to each of your data sets and then click Add. In the lower left, choose Top Row and Left Column.

In the Consolidate dialog box, use the RefEdit button to point to the data on each of the three worksheets. In the lower left corner, make sure to choose Use Labels In: Top Row, Left Column.
This worksheet shows the result of the Consolidation. Names from all three lists appear in A2:A12. Across the top, all 12 months from Jan through Dec appear. Numbers populate the center of the grid. Several cells that should be numeric in the middle are empty instead of 0.

In the above figure, notice three annoyances: Cell A1 is always left blank, the data in A is not sorted, and if a person was missing from a data set, then cells are left empty instead of being filled with 0.

Filling in cell A1 is easy enough. Sorting by name involves using Flash Fill to get the last name in column N. Here is how to fill blank cells with 0:

  1. Select all of the cells that should have numbers: B2:M11.
  2. Press Ctrl+H to display Find & Replace.
  3. Leave the Find What box empty, and type a zero in the Replace With: box.
  4. Click Replace All.

The result: a nicely formatted summary report, as shown below.

Fill in the blanks with zero. Apply a table style.

The other ancient tool is the Multiple Consolidation Range pivot table. Follow these steps to use it:

1. Press Alt+D, P to invoke the Excel 2003 Pivot Table and Pivot Chart Wizard.

2. Choose Multiple Consolidation Ranges in step 1 of the wizard. Click Next.

Press Alt+D P to open the legacy PivotTable and PivotChart Wizard. In Step 1 of 3, choose Multiple Consolidation Ranges.

3. Choose I Will Create the Page Fields in step 2a of the wizard. Click Next.

4. In Step 2b of the wizard, use the RefEdit button to point to each table. Click Add after each.

In the PivotTable wizard Step 2b of 3, specify all three ranges. Specify 0 page fields.

5. Click Finish to create the pivot table, as shown below.

The pivot table has names down the side and months across the top. It is very similar to the Consolidation report, but is refreshable.

Comments

Popular posts from this blog

Up and Down Markers using Conditional Formatting

There is a super-obscure way to add up/down markers to a pivot table to indicate an increase or a decrease. Somewhere outside the pivot table, add columns to show increases or decreases. In the figure below, the difference between I6 and H6 is 3, but you just want to record this as a positive change. Use  SIGN(I6-H6)  to get either +1, 0, or -1. Select the two-column range showing the sign of the change and then select Home, Conditional Formatting, Icon Sets, 3 Triangles. (I have no idea why Microsoft called this option 3 Triangles, when it is clearly 2 Triangles and a Dash, as shown below.) With the same range selected, now select Home, Conditional Formatting, Manage Rules, Edit Rule. Check the Show Icon Only checkbox. With the same range selected, press  Ctrl+C  to copy. Select the first Tuesday cell in the pivot table. From the Home tab, open the Paste dropdown and choose Linked Picture. Excel pastes a live picture of the icons above the table. At this point, adju...

Indirect Function

INDIRECT  is pretty cool for grabbing a value from a cell. Can  INDIRECT  point to a multi-cell range and be used in a  VLOOKUP  or  SUMIF  function?  You can build an  INDIRECT  function that points to a range. The range might be used as the lookup table in a  VLOOKUP  or as a range in  SUMIF  or  COUNTIF . In  Figure , the formula pulls data from the worksheets specified in row 4. The second argument in the  SUMIF  function looks for records that match a certain date from column A. Note:  Because each worksheet might have a different number of records, I chose to have each range extend to 300. This is a number that is sufficiently larger than the number of transactions on any sheet. The formula in cell B5 is: =SUMIF(INDIRECT(B$4&"!A2:A300"), $A5, INDIRECT(B$4&"!C2:C300")) Summary:  You can use  INDIRECT  to grab data from a multi-cell range.

Create Sum that gives summary of all Worksheets in Excel

  You have a workbook with 12 worksheets, 1 for each month. All of the worksheets have the same number of rows and columns. You want a summary worksheet in order to total January through December. To create it, use the formula  =SUM(January:December!B4) . Copy the formula to all cells and you will have a summary of the other 12 worksheets. Caution I make sure to never put spaces in my worksheet names. If you do use spaces, the formula would have to include apostrophes, like this:  =SUM('Jan 2018:Mar 2018'!B4) .