Forum Discussion
Combining two spreadsheets, one has an extra category
The user wants to combine two spreadsheets that have different information about clients, and add an extra column to show which clients belong to a specific department. The user cannot share the spreadsheets because they are confidential.
One possible way to answer the user's question is to use the Consolidate command in Excel, which can help to summarize data from multiple sheets or workbooks into one sheet. The Consolidate command can work by position or by category, depending on how the data is arranged in the source sheets. To use the Consolidate command, follow these steps:
- In your destination sheet, click the upper-left cell of the area where you want the consolidated data to appear.
- On the Data tab, in the Data Tools group, click Consolidate.
- In the Function box, click the function that you want Excel to use to consolidate the data.
- To indicate where the labels are located in the source ranges, select the check boxes under Use labels in: either the Top row, the Left column, or both.
- In each source sheet, select your data. Make sure to include either the top row or left column information that you previously selected. The file path is entered in All references.
- When you have added the data from each source sheet and workbook, click OK.
https://support.microsoft.com/en-us/office/combine-data-from-multiple-sheets-dd7c7a2a-4648-4dbe-9a11-eedeba1546b4 Alternatively, you can also use other methods to combine Excel worksheets, such as Power Query, VLOOKUP function, or VBA code. https://business.tutsplus.com/tutorials/how-to-combine-excel-spreadsheets--cms-30397https://www.ablebits.com/office-addins-blog/consolidate-excel-merge-sheets/and this article. I hope this helps.
H2Othanks for your help but i'm having issues with consolidation. i don't know which function to use nor which cells to select.
this is an example of spreadsheet 2;
| Client Name | Department |
| Yellow, Andrew | |
| Bello, Anna | |
| Brick, Anna | |
| Ran, Sam |
this is an example of spreadsheet 1;
| Department | Client name |
| XX | Bloggs, Anna |
| XX | Biggs, Anna |
| XX | Brux, Anna |
| XX | Bello, Anna |
| XX | Brick, Anna |
i want to be able to import into spreadsheet 2 the department category for all clients listed in spreadsheet 1 only. but spreadsheet 2 has lots of clients and lots aren't in department X, the department column in spreadsheet 2 is currently blank. does this help explain what i'm after?
thank you
- SergeiBaklanJul 13, 2023Diamond Contributor
You may use any lookup function, e.g.
=XLOOKUP($A2, Sheet1!$B:$B,Sheet1!$A:$A, "" )Please check in attached.