The Best Possible Way for Combining Excel Files by Merging data into ONE Workbook - POWER QUERY Power Query is the best way to merge or combine data from multiple Excel files in a single file. You need to store all the files in a single folder and then use that folder to load data from those files into the power query editor. Merge one or many spreadsheets from one or many workbooks into a single workbook. Merge the data from many sheets into one worksheet. “Merging can be as simple as taking a list of people’s first and last names and showing them in one cell with a comma,” Gunnis explains.
Users of UW-Madison's institutional Tableau workbooks may need to pull data from one Microsoft Excel spreadsheet into another spreadsheet. This KB article explains how, by using an Excel formula called vLookup.
- Consolidate feature in Excel 2010, lets you to pull-each record from the worksheet in to one master worksheet, which adds-up all data from spreadsheets. Through Consolidation, you can summarize data from multiple sheets into one designated master sheet. By assembling data in to single master sheet, you can modify, or aggregate it under one window.
- Open the Excel file where you want to merge sheets from other workbooks and do the following: Press Alt + F8 to open the Macro dialog. Under Macro name, select MergeExcelFiles and click Run. The standard explorer window will open, you select one or more workbooks you want to combine, and click Open.
- To copy a spreadsheet within the same workbook or to a target workbook: Open your workbook and select the spreadsheet you want to copy. Right-click and then click Move or Copy. In the Move or Copy dialog box, select the target workbook in the Move Selected Sheets to Book dropdown menu, whether the same or external.
- Locate where you want the data to go. Click that cell only once.
- At the top, go to the Formulas tab and click Lookup & Reference.
- Select vLookup
- Excel’s vLookup wizard will pop up. We’ll walk through each part of the formula.
Find the Unique Identifier (lookup value). It is usually in the same row as the empty cell you selected.
Click once on the Unique Identifier so that the cell position will automatically fill in. In this example it is cell B2.
- Go to the next field, Table_array (click in it once). In Spreadsheet 2 highlight the table containing the info you want, starting with the Unique ID.
In this example, Excel looks up Campus ID 555123123 in the first highlighted column of Spreadsheet 2.
Note: Make sure each Unique ID is listed only once in the table_array (on the second spreadsheet) so that vLookup retrieves the correct value. For example, if 555123123 is duplicated in the table_array, where Student [email protected] is the email in one row and Student [email protected] in the other, Excel will choose one of the emails for you.
- Go to Col_index_num (click in it once). This identifies which column contains the information you want from Spreadsheet 2.
Type the number of columns your field is from the Unique ID, where the Unique ID is 1. Here, the Email field is the third column.
- Go to Range_lookup (click in it once). Type FALSE to search for exact matches. The result will look something like this:
- Finally, copy and paste the formula to pull emails for the rest of the column.
(Note: if your table array is in the same Excel workbook, put $ signs around the cell values, similar to the example below. This ensures that you reference the correct cells in the table array, meaning that the table array does not shift down when you paste the formula down. See Advanced Tip below for more details.)
- Type the beginning of the formula: =VLOOKUP(
The formula guide will appear below.
(Note: You may notice Excel displays the formula in 2 places: the formula bar above and directly in the cell. You can edit the formula in either place.)
- Follow the guide and enter each value. Remember to insert a comma between each value.
- Insert a closed parenthesis ) and hit Enter. The end result will look like something like this:
- Finally, copy and paste the formula to pull emails for the rest of the column. Keep relative references in mind and use $ signs where necessary. (See Advanced Tip below for more details.)
Combining Excel Documents
- To lock in the lookup value in cell B1, insert $ signs before the column and the row:
- To lock in the column only, insert a $ before B only.
- To lock in the row only, insert a $ before 1 only.
Need More Information or Help?
Combine Sheets In One WorkbookIf you have questions about this Tableau document, please contact Melissa Chan, Office of Data Management and Analytics Services (ODMAS) at [email protected].
|Keywords:||Tableau Workbook Dashboard Excel 2 Two Combine Pull Data IDESuggest keywords||Doc ID:||90851|
|Owner:||Steven T.||Group:||Office of Data Management & Analytics Services KB|
|Created:||2019-04-04 11:15 CDT||Updated:||2020-06-20 04:08 CDT|
|Sites:||Office of Data Management & Analytics Services KB|
|Feedback:||243CommentSuggest a new document|