Skip to content
ArumSoft Learning
KO

    How to Consolidate Data from Several Sheets in Excel

    Combine lists from several sheets or workbooks into one summary with the Consolidate command, matching rows by their labels or by position.

    Level
    Intermediate
    Time
    10 min read
    Updated:
    Applies to:
    Excel for Microsoft 365, Excel 2021, Excel 2019, Excel for Mac
    The average of three years' bills for each month, from Consolidate with the Average function.
    Example: The average of three years' bills for each month, from Consolidate with the Average function.

    What you'll learn

    • Combine two or more lists into one summary with Data › Consolidate
    • Match rows and columns by their labels when the lists aren't in the same order
    • Choose a summary function other than Sum, such as Average or Count
    • Update a consolidation and decide when a PivotTable or Power Query is the better tool

    Consolidate adds up (or averages, counts…) several lists that share the same kind of data and writes one summary list. It's the quick answer when each store, class or month has its own sheet and you need the totals in one place. Excel can match the rows by their labels, so the lists don't have to be in the same order or even contain the same items.

    The examples use two store sheets, East and West. Each lists items with the units sold and the sales amount, but West has its items in a different order and sells one item East doesn't.

    ABC
    1ItemUnitsSales
    2Notebooks120360
    3Pens300450
    4Pencils250125
    5Tape80160
    The East sheet: four items in A1:C5, with units and sales.
    ABC
    1ItemUnitsSales
    2Pens280420
    3Notebooks90270
    4Tape60120
    5Pencils200100
    6Erasers7575
    The West sheet: the same items in a different order, plus Erasers (amber), which East doesn't sell.

    Where to find it

    Consolidate is on the Data tab, in the Data Tools group: Data then Data Tools then Consolidate. There's no keyboard shortcut and no right-click command for it.

    Consolidate sits in the Data Tools group of the Data tab, next to Data Validation.

    Combine two sheets by their labels

    The goal is a Summary sheet with one row per item and the total units and sales from both stores.

    1. Click where the summary should start

      Go to the Summary sheet and click A1. Excel writes the result down and to the right of this cell, so make sure that area is empty.

    2. Open Consolidate and pick the function

      Go to Data then Data Tools then Consolidate. In the Consolidate dialog, leave Function set to Sum.

    3. Add the East range

      Click in the Reference box, click the East sheet tab and select A1:C5, including the headings and the item names. The box shows East!$A$1:$C$5. Click Add, and the range moves to the All references list.

    4. Add the West range

      Click the West sheet tab, select A1:C6 and click Add again. West has one more row than East, and that's fine: each reference can be a different size.

    5. Tell Excel to use the labels

      Under Use labels in, tick Top row and Left column. This is what makes Excel match "Pens" on East with "Pens" on West, wherever they are in each list. Click OK.

      Sum the two ranges, and match rows by the item names (Left column) and columns by the headings (Top row).
    6. Check the result

      Each item appears once, with both stores added together. Notebooks: 120 units on East plus 90 on West is 210, and 360 plus 270 in sales is 630. Erasers appear only on West, so their row shows West's figures, 75 and 75.

      ABC
      1UnitsSales
      2Notebooks210630
      3Pens580870
      4Pencils450225
      5Tape140280
      6Erasers7575
      The Summary sheet after Consolidate. Every item appears once; Erasers (green) came from West only. A1 is left empty.

    Two things to notice. Excel leaves the top-left cell, A1, empty: type Item there yourself. And the results are plain numbers, not formulas, so they won't change when the store sheets change (see "Update a consolidation" below).

    Consolidate by position instead

    If you don't tick Top row or Left column, Excel consolidates by position: the first cell of every reference is added to the first cell of the others, the second to the second, and so on. Labels in the selected ranges are ignored, so select only the numbers and type the labels in the summary yourself.

    This works only when every list has exactly the same layout: same items, same order, same columns. Monthly sheets copied from one template are the typical case. If the order differs even once, by-position consolidation adds the wrong rows together without any warning, which is why labels are the safer choice whenever your lists have them.

    The options in the dialog

    OptionWhat it does
    FunctionHow the values are combined: Sum, Count, Average, Max, Min, Product, Count Numbers, and the standard deviation and variance functions. Count counts every non-empty value, like COUNTA; Count Numbers counts only numbers, like COUNT.
    ReferenceThe range you're adding. Select it with the mouse, or type it, such as East!$A$1:$C$5.
    Browse...Picks a range from a workbook that isn't open. It's usually easier to open the other workbook first and select the range in it.
    Add / DeleteAdds the current reference to All references, or removes the one you selected in the list.
    Top row / Left columnMatch columns by their headings and rows by their labels. Labels that appear in only some lists still get their own row or column.
    Create links to source dataWrites formulas that link to the source cells instead of plain numbers. Explained in the next section.

    Update a consolidation

    A normal consolidation is a snapshot. When the source sheets change, run it again: select the same top-left cell, open Consolidate, and click OK. Excel remembers the references you added in this workbook, so you don't have to select them again. To add a new store, select its range and click Add before OK.

    If you tick Create links to source data, Excel writes formulas instead of numbers. For each item it inserts a hidden detail row per source that links to the source cell, and a total row that adds them up, then groups them in an outline: the + buttons to the left of the rows show where each number came from. The totals now update when a source value changes. Two limits: links work only when the sources are on other sheets or in other workbooks, and an item that's added to a source list later doesn't appear until you consolidate again.

    Real-world scenarios

    Work

    Expenses from three departments

    Marketing, Sales and Support each keep a sheet of expenses by category, and not every department has every category. Consolidate with Sum and both label boxes ticked, selecting A1:B4 on each sheet (Category and Amount headings included).

    AB
    1Amount
    2Travel3,800
    3Software750
    4Supplies390
    5Training1,300
    Spending by category for all three departments. Supplies appears on every sheet; Training only on two.

    Travel is 3,800 (1,200 from Marketing and 2,600 from Sales). Supplies, which every department buys, is 180 + 120 + 90 = 390. Each category appears once, however many sheets it was on.

    School

    Volunteer hours for the whole year group

    Three classes record their volunteer hours on identical sheets: months September to December in A2:A5 and hours in B2:B5. Because the layout is the same, consolidate by position: type the months in the summary, click B2, and add B2:B5 from each class sheet with no label boxes ticked.

    AB
    1MonthHours
    2Sep30
    3Oct48
    4Nov46
    5Dec27
    Total hours per month for the three classes, consolidated by position into B2:B5.

    October is 18 + 14 + 16 = 48 hours. If one class had sorted its months differently, these totals would be wrong, so check the sheets before you use by-position consolidation.

    Personal

    Your typical electricity bill

    You keep one sheet per year with the bill for each month from January to June in A2:B7. On a summary sheet, type your own headings in row 1 and click A2. Set Function to Average, tick only Left column, and add A2:B7 from each year's sheet.

    AB
    1MonthAverage bill
    2Jan66
    3Feb59
    4Mar53
    5Apr47
    6May42
    7Jun60
    The average of three years' bills for each month, from Consolidate with the Average function.

    January averages (62 + 66 + 70) ÷ 3 = 66, and May only 42. Because Left column is ticked, each month is matched by its name, so a year that lists its months in a different order still averages correctly.

    Consolidate, PivotTable or Power Query?

    ToolBest when
    ConsolidateA one-off summary of a few lists, especially when they're on separate sheets with different items.
    3-D formulaEvery sheet has exactly the same layout and you want totals that update by themselves.
    PivotTableYour data is (or can be) one long list with a column saying where each row came from.
    Power QueryYou repeat the job every week or month: append the lists once, then refresh.

    Common mistakes

    • Leaving the label boxes unticked when the lists differ. Excel then adds row 2 to row 2, so West's Pens are added to East's Notebooks. The result looks plausible but is wrong. Tick Top row and Left column, or make every layout identical.
    • Labels that are almost the same. "Pens" and "Pen", or "Tape" with a trailing space, become separate rows. Fix the source labels (TRIM helps) and consolidate again.
    • Including total rows in the references. If a source sheet has a Total row inside the selected range, it's added in too and the summary double-counts. Select only the item rows and their headings.
    • Expecting the summary to update itself. Without Create links to source data, the numbers are values. Run Consolidate again after the sources change.
    • Too little room for the result. Excel writes over cells below and to the right of the active cell. Start the summary on an empty sheet or an empty area.

    Practice

    Practice

    Build a summary of two store sheets

    1. In a new workbook, rename two sheets East and West and type the two lists from the top of this page. Add a third sheet called Summary.
    2. On Summary, click A1, open Data then Data Tools then Consolidate, and add A1:C5 from East and A1:C6 from West.
    3. Tick Top row and Left column and click OK. Check that Pens shows 580 units and 870 in sales.
    4. On West, change the Pens units from 280 to 300. Run Consolidate again from A1 and check that Pens now shows 600.
    5. Undo, then try the same consolidation with both label boxes unticked. Compare the result with step 3 and work out why it's different.

    Related

    Was this guide helpful? Spot a mistake? Send feedback · admin@arumsoft.com