DEV Community

Andrews
Andrews

Posted on • Originally published at geekexcel.com on

Excel Formulas to Merge the Tables with VLOOKUP Function!!

Considers there are two tables in your worksheet, and you need to merge table 2 to table 1 by using the VLOOKUP function. Here this article introduces the simple formulas to solve this job on Excel. Let’s see them below!! Get an official version of ** MS Excel** from the following link: https://www.microsoft.com/en-in/microsoft-365/excel

Merge table with vlookup
Merge table with vlookup

General Formula:

  • Use the below formula to merge the tables.

=VLOOKUP($A1,table,COLUMN()-x,0)

Syntax Explanations:

  • VLOOKUP – In Excel, this function will help to lookup data in a range or table by row.
  • COLUMN – The COLUMN Function in Excel returns the column number for a reference.
  • Absolute Reference ($) – The absolute reference is an actual fixed location in a worksheet.
  • X – It specifies the column number where you want to display your output.
  • Comma symbol (,) – It is a separator that helps to separate a list of values.
  • Parenthesis () – The main purpose of this symbol is to group the elements.
  • Minus Operator (-) – This symbol will help to subtract any two values.

Example:

To merge data in Excel, we should have at least one common factor/id in both tables, so that we can use it as a relation and merge those tables.

  • Consider these two tables below. One table has the order details and another one is the customer details.
  • Here you want to find the name of the customer based on their ID.

Input Ranges
Input Ranges

  • You need to enter the above-given formula into the cell E5 or formula bar section.
  • After applying the formula, you can get the results as per the below image.

Result
Result

Closure:

From this short tutorial, you can get some clarification on how to merge the tables in Excel by using the VLOOKUP function. Hope you like it. If you have any questions, feel free to share them with us. Click here to know more about Geek Excel!! And Excel Formulas !!

Read Also:

Top comments (0)