Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • Lookup entire row in Excel
  • INDEX function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel COLUMN Function
  • How to get first row number in range in Excel
  • How to get last row in text data in Excel

Data Analysis Examples

  • Conditional Formatting New Rule with Formulas in Excel
  • How to Create One and Two Variable Data Tables in Excel
  • Conditional Formatting Data bars Examples in Excel
  • How to Use Solver Tool in Excel
  • Filter Data Based on Date in Excel

Data Validation Examples

  • Excel Data validation unique values only
  • Excel Data validation with conditional list
  • Excel Data validation whole percentage only
  • Excel Data validation allow weekday only
  • Data validation must not exist in list

How to calculate two-way lookup VLOOKUP in Excel Table

by

To do a two-way lookup in an Excel Table, you can use the MATCH function with a structured reference and VLOOKUP. See example below:

Recall that VLOOKUP depends on the lookup value being to the left of the value being retrieved in a table. Generally, this means the lookup value will be the first value in the table. If you have data where the lookup value is not the first column, you can switch to INDEX and MATCH for more flexibility.

Worked Example:   MATCH function: Description, Usage, Syntax, Examples and Explanation

Formula

=VLOOKUP(id,Table1,MATCH(colname,Table1[#Headers],0),0)

Explanation

In the example shown, the formula in I5 (copied down) is:

=VLOOKUP($I$4,Table1,MATCH(H5,Table1[#Headers],0),0)

How this formula works

At a high level, we using VLOOKUP to extract employee information in 4 columns with ID as the lookup value. The ID value comes from cell I4, and is  locked so that it won’t change as the formula is copied down the column.

The table array is the table named Table1, with data in the range B5:F104.

Worked Example:   Find missing values in Excel

The column index is provided by the MATCH function.

For more examples on Two-way lookup VLOOKUP in Excel visit:

  • Excel Two-Way Lookup Example
  • Dynamically lookup both rows and columns with VLOOKUP
  • Two-way lookup with INDEX and MATCH

And match type is zero, so force VLOOKUP to perform an exact match.

The MATCH function is used to get a column index for VLOOKUP like this:

MATCH(H5,Table1[#Headers],0)

This is what accomplishes the two-way match. Values in column H correspond to the headers in the table, so these go into match as lookup values.

Worked Example:   How to calculate average last N values in a table in Excel

The array is the headers in Table1, specified as a structured reference.

Match type is set to zero to force an exact match.

MATCH then returns the position of the match. For the formula in I5, this the position is 2, since “First” is the second column in the table.

VLOOKUP then returns the first name for id 601, which is Adrian.

Post navigation

Previous Post:

How to calculate current stock or inventory in Excel

Next Post:

How to conditionally sum numeric data in an Excel table using SUMIFS

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • How to Capitalize first letter in a sentence in Excel
  • Excel MAX, MATCH and ADDRESS function illustration
  • EXACT function: Description, Usage, Syntax, Examples and Explanation
  • DBCS function: Description, Usage, Syntax, Examples and Explanation
  • RIGHT, RIGHTB functions: Description, Usage, Syntax, Examples and Explanation
  • How to determine year is a leap year in Excel
  • Get first day of previous month in Excel
  • Count dates in current month in Excel
  • Convert text to date in Excel
  • Add workdays no weekends in Excel
  • How to calculate compound interest in Excel
  • AMORDEGRC function: Description, Usage, Syntax, Examples and Explanation
  • TBILLYIELD function: Description, Usage, Syntax, Examples and Explanation
  • ODDFYIELD function: Description, Usage, Syntax, Examples and Explanation
  • CUMIPMT function: Description, Usage, Syntax, Examples and Explanation
Acronyms, Abbreviations, Initialism & What They Stand For
© 2022 xlsoffice . All Right Reserved. | Teal Smiles