Merge Two Tables in Excel (Table of Contents)
Merge Two Tables in Excel
Merging tables in Excel is not possible when both the table at least one common column. If the first condition is satisfied, then we can merge the tables with VlookUP and Index Match function. With the Vlookup function’s help, we can get the values from the second table to the first table if the lookup value matches with the Lookup range. And if we want to use the Index function along with Match to merge the tables, we must also have at least one common value to map.
Examples of Merge Two Tables in Excel
Below are the different examples to merge to tables in Excel:
Example #1: Merge with Copy Paste Method
This is the easiest method to do. It does not involve any kind of formula or rocket science. We just simply do the copy & paste method to combine the two. I have two months of sales tables. One is Jan, and another one is Feb month sales data.
I have two identical tables here but not together. We can do two simple merges here. One is creating a new table altogether or add data to the existing table. If you observe, the headings of both the tables are the same.
Alternative 1
Since I have the region as the same heading, I can merge a table like the below one.
In the above image, I have excluded the Region heading because it is common for both tables.
Alternative 2
To make the data more flexible for analysis, I can just modify the data structure as shown in the below table.
Now look at the above table, I have merged the one below the other, but I have added one more column as Month. This is to analyze the data by applying the pivot table; the above data structure is important. We can easily apply the pivot table for the above table.
Example #2: Merge with VLOOKUP Method
Who does not know VLOOKUP? All most all excel users are aware of it; I hope you are also aware of it. If you the full usage of VLOOKUP, merging tables will be easier for you. I have three tables of employee’s information. The first table shows the Emp ID and their name, the second table shows the Emp ID and their department, the third table shows the Emp ID and their salary information.
If you look at all three tables, EMP ID is the common heading in all three tables. Based on this common heading, we can merge all three tables together. Merging should be in the below format.
I need to merge Department and Salary columns from Table 2 and Table 3. If you are aware of the VLOOKUP formula, then this will be a walk in the park.
- Apply VLOOKUP formula for Department from table 2 :
- Apply VLOOKUP formula on cell N2 of department column :
- Apply the formula as shown below :
- The result is shown in the below image :
- Now drag down the formula to all the empty cells :
- Apply VLOOKUP formula for Salary from table 3:
- Apply VLOOKUP formula on cell O2 of Salary column :
- Apply the formula as shown below :
- The result is shown in the below image :
- Now drag down the formula to all the empty cells :
Now we have merged all the data from the different table together by applying the VLOOKUP method.
Example #3: Merge with INDEX & MATCH Method
INDEX & MATCH would be a new formula for you. But nothing to worry it is just an alternative formula for the VLOOKUP formula. It works exactly the same as the VLOOKUP formula.
- Use the below formula for merging the Department column from Table 2:
- Apply VLOOKUP formula on cell L3 of department column :
- Apply the formula as shown below :
- The result is shown in the below image :
- Now drag down the formula to all the empty cells :
- Use the below formula for merging the Salary column from Table 3 :
- Apply VLOOKUP formula on cell N2 of department column :
- Apply the formula as shown below :
- The result is shown in the below image :
- Now drag down the formula to all the empty cells :
Things to Remember about Merge Two Tables in Excel
- POWER QUERY can merge many tables together. In Excel 2010 and in 2013, it is an add-in, and in excel 2016, it is a built-in function.
- If you are merging by using VLOOKUP, you need to be careful of duplicate entries in the lookup value. Check for duplicate values before you proceed.
- Once the formula is applied, remove the formula by using the paste special method because it will hamper your merged data table if something happens to other dependent tables.
- You can use the IFERROR function to get rid of errors generated by the VLOOKUP formula in case of errors.
- If the data is in many worksheets with the same headings, you can search for VBA code to combine worksheets together.
Recommended Articles
This has been a guide to Merge Two Tables in Excel. Here we discuss the Merge Two Tables in Excel and how to Merge Two Tables in Excel along with practical examples and downloadable excel template. You can also go through our other suggested articles –