Problem: Jerry and Tina each compiled sales figures from paper invoices. I need to combine Jerry and Tina's list into a single list. Some customers are in both lists.
- Combine the lists into a single list.
Strategy: Excel offers a great tool for consolidating data. Here's how you use it:
- Move the cell pointer to a blank area of the worksheet. You will need a blank area with several rows and a few columns.
- Select Data, Consolidate.
- Make sure that both boxes under Use Labels In are checked. This means that Excel relies on the headings to be the same and that the customer field is in the left column of each range.
- Put the cell pointer in the Reference field. Click the Collapse button at the right end of the Reference field. With the mouse, select the first range: A1:B23. Click the Collapse button again to return to the Consolidate dialog.
Note: There are times when you will want to consolidate just a single range of data. This would be effective if you needed to combine duplicate customers from one list. However, in this example, you need to combine two lists.
- Click the Add button to move the first reference from the Reference field to the All References box.
- After the first reference is added to the All References box, click the Collapse button again to specify the second reference.
- Use the mouse to select D1:E23. Click the Collapse button to return to the Consolidate dialog. Click the Add button to add the reference to the All References list. The Consolidate dialog should appear as below
.
- Make sure both ranges are in the All References box.
- Choose OK. In a few seconds, Excel will return a brand new list that extends down and to the right from your starting cell. The list will contain one instance of each customer along with the total revenue from the customer.
- Excel combines the two lists into a single list.
Gotcha: The new list is not in any sequence. You can see that it kind of starts out in the sequence of the first list but then randomly inserts customers from the second list. You will probably want to sort the list alphabetically or by revenue. However, Excel always fails to fill in the label in the upper-left corner of the consolidation. If you want to sort the result, you need to type the word Customer in cell G2.
Additional Details: The Function box in the Consolidate dialog offers many functions other than SUM. For instance, if you want to find the largest purchase by each customer, you can use the MAX function.
Gotcha: The results of the consolidation are all static values. If you change an item in the original list, the consolidation will not automatically update. This is good because it allows you to delete the original two lists and keep just the new list.