Lookup Functions in Excel: Learn All 6 Functions - ExcelTutorial (2024)

In this guide, we will be discussing the six most commonly used lookup functions in Excel: Vlookup, Hlookup, Xlookup, Index, Match, and Choose. These functions allow you to search and retrieve data from a specific table or range based on specific conditions or criteria.

Vlookup

The Vlookup (vertical lookup) function searches for a specific value in the first column of a table and returns a corresponding value in a specified column. It is one of the most commonly used lookup functions in Excel and is useful when you have a large amount of data and need to find specific information.

The syntax for the Vlookup function is as follows: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

Where:

  • Lookup_value: This is the value you want to search for in the first column of the specified range.
  • Table_array: This is the range of cells that contains the lookup value and the data you want to retrieve.
  • Col_index_num: This is the column number within the table array that contains the data you want to retrieve.
  • [Range_lookup]: This is an optional argument that specifies whether you want an exact match (0) or an approximate match (1). If you leave this argument blank, it defaults to an exact match.

Step-by-Step Guide for Vlookup in Excel:

  1. Type “=Vlookup(” into a blank cell in your Excel sheet.
  2. In the parentheses, enter the value you want to search for. This is called the “lookup value.”
  3. Add a comma “,” and select the range of cells that contains the lookup value and the data you want to retrieve. This is called the “table array.”
  4. Add another comma “,” and specify the column number within the table array that contains the data you want to retrieve.
  5. Add another comma “,” and specify whether you want an exact match (FALSE) or an approximate match (TRUE). If you leave this argument blank, it defaults to an exact match.
  6. Close the parentheses and press “Enter.” The Vlookup function will now retrieve the data you specified from the specified column in the table array, based on the lookup value you entered.
Lookup Functions in Excel: Learn All 6 Functions - ExcelTutorial (1)

In the example above, the function tells Excel to search for the value in cell A2 within the range J5:K8 and returns the corresponding value in the second column of the range with an exact match specified.

Hlookup

The Hlookup (horizontal lookup) function is similar to Vlookup but searches for data horizontally instead of vertically. It searches for a specific value in the first row of a table and returns a corresponding value in a specified row.

Syntax: =HLOOKUP(value, table, row, [exact match])

Where:

  • Value is the data you want to search for.
  • Table is the range of cells that contains the data you want to search.
  • Row is the row number in the table that contains the data you want to return.
  • [Exact match] is an optional argument that specifies whether you want an exact match (FALSE) or an approximate match (TRUE).

Step-by-step Guide for HLOOKUP in Excel:

  1. Type “=HLOOKUP(” in a cell to start the HLOOKUP formula.
  2. Specify the lookup value: In the first argument, specify the value that you want to search for in the top row of the specified range of cells. For example, “A2”.
  3. Insert a comma “,” and then specify the table array: In the second argument, specify the range of cells that contains the lookup value and the data you want to retrieve. For example, “A1:C10”.
  4. Insert another comma and specify the row index number: In the third argument, specify the row number within the table array that contains the data you want to retrieve. For example, “2”.
  5. Specify the range lookup: In the fourth argument, specify whether you want an exact match (FALSE ) or an approximate match (TRUE). If you leave this argument blank, it defaults to an exact match.
  6. Press enter to complete the formula and view the result.
Lookup Functions in Excel: Learn All 6 Functions - ExcelTutorial (2)

In the example above, the function tells Excel to search for the value in cell A2 within the range K12:N13 and returns the corresponding value in the second row of the range with an exact match specified.

Xlookup

The Xlookup function is a new function in Excel that allows you to search for data in either a vertical or horizontal table. It has several advantages over the Vlookup and Hlookup functions, including the ability to search for data in either direction, better handling of errors, and improved performance.

Syntax: =Xlookup(value, lookup_array, result_array, [match_mode], [search_mode])

Where:

  • Value is the data you want to search for.
  • Lookup_array is the range of cells that contains the data you want to search.
  • Result_array is the range of cells that contains the data you want to return.
  • [Match_mode] is an optional argument that specifies whether you want an exact match (1) or an approximate match (0).
  • [Search_mode] is an optional argument that specifies whether you want to search vertically (1) or horizontally (2).

Step-by-Step Guide for Using the XLOOKUP Function in Microsoft Excel:

  1. Type “=XLOOKUP(” in a cell to start the XLOOKUP formula.
  2. Specify the lookup value: In the first argument, specify the value that you want to search for in the first column of the specified range of cells.
  3. Specify the lookup array: In the second argument, specify the range of cells that contains the lookup value and the data you want to retrieve.
  4. Specify the return array: In the third argument, specify the range of cells that contains the data you want to retrieve. This can be a different range from the lookup array.
  5. Specify the default value: In the fourth argument, specify the value that you want to return if the XLOOKUP function does not find a match for the lookup value. For example, “Not Found”.
  6. Specify the match mode: In the fifth argument, specify the type of match you want the XLOOKUP function to use. 0 for exact match, 1 for first value that is greater than or equal to the lookup value, -1 for first value that is less than or equal to the lookup value, and 2 for wildcard matching.
  7. Specify the search mode: In the sixth argument, specify the search direction for the XLOOKUP function. 0 for search from the first cell to the last cell, and 1 for search from the last cell to the first cell.
  8. Press enter to complete the formula and view the result.

Make sure to separate each argument with a comma.

Lookup Functions in Excel: Learn All 6 Functions - ExcelTutorial (3)

In this example, the formula tells Excel to search for the value in cell A2 within the first column (J5:J8) of the specified range and return the corresponding value from the second column (K5:K8) or the specified “Not Applicable” value if no match is found, with a range match specified.

Match

The Match function searches for a specific value in a range of cells and returns the relative position of the first match. It is often used in combination with the Index function to search for specific data.

Syntax: =MATCH(value, lookup_array, [match_type])

Where:

  • Value is the data you want to search for.
  • Lookup_array is the range of cells that contains the data you want to search.
  • [Match_type] is an optional argument that specifies whether you want an exact match (1), an approximate match (0), or an exact match or the next smallest value (-1).

Step-by-Step Guide for Using the MATCH Function in Microsoft Excel:

  1. Type “=MATCH(” in a cell to start the MATCH formula.
  2. Specify the lookup value: In the first argument, specify the value that you want to search for in the specified range of cells. For example, “A2”.
  3. Specify the lookup array: In the second argument, specify the range of cells that contains the lookup value. For example, “A1:C10”.
  4. Specify the match type: In the third argument, specify the type of match you want the MATCH function to use. 0 for exact match, 1 for first value that is greater than or equal to the lookup value, and -1 for first value that is less than or equal to the lookup value. For example, “0”.
  5. Press enter to complete the formula and view the result.
Lookup Functions in Excel: Learn All 6 Functions - ExcelTutorial (4)

In this example, the formula tells Excel to search for the value in cell A5 in the range J5 to J8 and returns the relative position of the first match in the range.

Index

The Index function returns the value of a cell in a specified row and column within a table. It is often used in combination with the Match function to search for specific data.

Syntax: =INDEX(array, row_num, [column_num])

Where:

  • Array is the range of cells that contains the data you want to search.
  • Row_num is the row number in the array that contains the data you want to return.
  • [Column_num] is an optional argument that specifies the column number in the array that contains the data you want to return.

Step-by-Step Guide for Using the INDEX Function in Microsoft Excel:

  1. Type “=INDEX(” in a cell to start the INDEX formula.
  2. Specify the array: In the first argument, specify the range of cells that you want to return a value from.
  3. Specify the row number: In the second argument, specify the row number in the array from which you want to return a value.
  4. Specify the column number: In the third argument, specify the column number in the array from which you want to return a value. .
  5. Press enter to complete the formula and view the result.
Lookup Functions in Excel: Learn All 6 Functions - ExcelTutorial (5)

This tells Excel to return the value in the cell at the intersection of the row specified in cell E18 and the second column of the range A18 to B29 using the INDEX function.

Choose

The Choose function returns a value from a list based on a specified index number. It allows you to select a value from a list of options based on a specified index number.

Syntax: =CHOOSE(index_num, value1, value2, …)

Where:

  • Index_num is the index number that specifies which value you want to return.
  • Value1, value2, … are the values you want to choose from.

Step-by-Step Guide for Using the CHOOSE Function in Microsoft Excel:

  1. Type “=CHOOSE(“ in a cell to start the CHOOSE formula.
  2. Specify the index number: In the first argument, specify the index number that you want to use to select a value from the list of values. The index number must be a positive integer. For example, “3”.
  3. Specify the values: In the following arguments, specify the list of values from which you want to choose a value. For example, “1”, “2”, “3”, “4”.
  4. Press enter to complete the formula and view the result.
Lookup Functions in Excel: Learn All 6 Functions - ExcelTutorial (6)

In the example above, this tells Excel to return the value corresponding to the index specified in cell E18 from the list of values in cells B19 to B29.

Conclusion

These six lookup functions are powerful tools that can help you retrieve and manipulate data from a spreadsheet. Each of these functions has its own specific syntax and usage, but they all allow you to quickly find information based on specific criteria, making them essential tools for data analysis and management.

Related Posts:

  • How to use XLOOKUP in Excel - The Ultimate Guide
  • Excel VLOOKUP Function: 6 Ways to Use This Useful Formula
  • How to Perform a Case-Sensitive Lookup in Excel
  • How to use SUMIFs Function in Excel?
  • Date and Time Functions in Excel
  • How To Make A Data Table In Google Sheets

As an Excel expert with extensive experience in data analysis and spreadsheet management, I can attest to the importance of lookup functions in Excel for efficiently retrieving and manipulating data. Let's delve into each of the concepts mentioned in the article, providing additional insights and tips.

VLOOKUP (Vertical Lookup)

The VLOOKUP function is crucial for searching and retrieving data vertically in a table. It's commonly used when dealing with extensive datasets. Here's a breakdown:

  • Syntax:

    =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
  • Explanation:

    • lookup_value: The value you want to search for in the first column of the specified range.
    • table_array: The range of cells containing the lookup value and the data to retrieve.
    • col_index_num: The column number within the table array containing the data to retrieve.
    • [range_lookup]: Optional argument for an exact match (0) or an approximate match (1).
  • Tip:

    • Always ensure your data is sorted in ascending order for approximate matches to work effectively.

HLOOKUP (Horizontal Lookup)

Similar to VLOOKUP, HLOOKUP searches for data horizontally. It's useful when your data is organized in rows:

  • Syntax:

    =HLOOKUP(value, table, row, [exact match])
  • Explanation:

    • value: The data to search for in the first row of the specified range.
    • table: The range of cells containing the data to search.
    • row: The row number within the table containing the data to retrieve.
    • [exact match]: Optional argument for an exact match (FALSE) or an approximate match (TRUE).

XLOOKUP

The XLOOKUP function is a versatile upgrade allowing searches both vertically and horizontally:

  • Syntax:

    =XLOOKUP(value, lookup_array, result_array, [match_mode], [search_mode])
  • Explanation:

    • value: The data to search for in the specified range.
    • lookup_array: The range containing the lookup value and data to retrieve.
    • result_array: The range containing the data to return.
    • [match_mode]: Optional argument for exact match (1) or approximate match (0).
    • [search_mode]: Optional argument for vertical (1) or horizontal (2) search.

MATCH

MATCH is often paired with INDEX. It finds the relative position of the first match:

  • Syntax:

    =MATCH(value, lookup_array, [match_type])
  • Explanation:

    • value: The data to search for.
    • lookup_array: The range containing the data to search.
    • [match_type]: Optional argument for exact match (1), approximate match (0), or exact match or next smallest value (-1).

INDEX

INDEX returns the value of a cell in a specified row and column:

  • Syntax:

    =INDEX(array, row_num, [column_num])
  • Explanation:

    • array: The range containing the data.
    • row_num: The row number in the array for the data to return.
    • [column_num]: Optional argument for the column number in the array for the data to return.

CHOOSE

CHOOSE is useful for selecting a value from a list based on an index number:

  • Syntax:

    =CHOOSE(index_num, value1, value2, …)
  • Explanation:

    • index_num: The index number specifying which value to return.
    • value1, value2, …: The values to choose from.

These functions collectively empower users to efficiently manage and analyze data in Excel, offering diverse approaches to lookup and retrieve information based on specific criteria. If you have any further questions or need additional guidance on Excel functions, feel free to ask!

Lookup Functions in Excel: Learn All 6 Functions - ExcelTutorial (2024)
Top Articles
Latest Posts
Article information

Author: Virgilio Hermann JD

Last Updated:

Views: 5906

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Virgilio Hermann JD

Birthday: 1997-12-21

Address: 6946 Schoen Cove, Sipesshire, MO 55944

Phone: +3763365785260

Job: Accounting Engineer

Hobby: Web surfing, Rafting, Dowsing, Stand-up comedy, Ghost hunting, Swimming, Amateur radio

Introduction: My name is Virgilio Hermann JD, I am a fine, gifted, beautiful, encouraging, kind, talented, zealous person who loves writing and wants to share my knowledge and understanding with you.