How do you use Excel’s LOOKUP function

The LOOKUP function in Excel is used to search for a value in a range (one row or column) and return a corresponding value from another range. It is often used to retrieve data based on a lookup value. Here’s how to use it:

Syntax


 

LOOKUP(lookup_value, lookup_vector, [result_vector])

  • lookup_value: The value you want to search for. This can be a number, text, or reference to a cell containing the search value.
  • lookup_vector: A single row or column range where Excel will search for the lookup_value.
  • result_vector (optional): A single row or column range that corresponds to the lookup_vector. Excel will return the value from this range that corresponds to the position of the lookup_value found in the lookup_vector.

If you omit the result_vector, LOOKUP will return a value from the lookup_vector itself.

Example

Let’s say you have the following data:

A B
Apple 10
Banana 20
Cherry 30
Date 40

You want to find the price for "Cherry." Here’s how to use LOOKUP:


 

excel

Copy code

=LOOKUP("Cherry", A1:A4, B1:B4)

  • lookup_value: "Cherry"
  • lookup_vector: A1:A4 (the list of fruits)
  • result_vector: B1:B4 (the list of prices)

This will return 30 because "Cherry" is in the third position of column A, and the corresponding value in column B is 30.

Notes:

  • The lookup_vector must be sorted in ascending order, or LOOKUP may not work as expected.
  • If an exact match for lookup_value is not found, LOOKUP will match the largest value in the lookup_vector that is less than or equal to lookup_value.
  All Comments:   0

Top Countries For How do you use Excel’s LOOKUP function

Top Keywords From How do you use Excel’s LOOKUP function