Back to Functions

LOOKUP

Looks through a row or column for a key and returns the value of the cell in a result range located in the same position as the search row or column.

LookupLOOKUP(search_key, search_range|search_result_array, [result_range])

The LOOKUP function in Google Sheets searches through a row or column for a key and returns the value of a cell in a corresponding result range, at the same relative position where the match was found. It's a simpler, more flexible predecessor to VLOOKUP and HLOOKUP for basic lookup tasks. Dive into our comprehensive guide to master its application.

Parameters

  • search_key: The value to search for.
  • search_range|search_result_array: Either the one-dimensional range to search, or a two-dimensional array containing both the search range and result range.
  • [result_range]: [Optional] The range containing the values to return, corresponding to search_range.

Step-by-Step Tutorial

  1. Using LOOKUP with separate search and result ranges:

    • Example: If A1:A3 contains "Red", "Green", "Blue" and B1:B3 contains 10, 20, 30, then =LOOKUP("Green", A1:A3, B1:B3) will return 20.
  2. Using LOOKUP with a single array:

    • Example: =LOOKUP("Blue", A1:B3) will search the first column of A1:B3 and return the corresponding value from the last column.

Use Cases and Scenarios

  1. Simple Value Retrieval: Pull a related value based on a matching key in a sorted list.
  2. Approximate Matching: Find the closest match when an exact match isn't required, since LOOKUP assumes sorted data.
  3. Legacy Spreadsheet Support: Maintain compatibility with older spreadsheets that rely on LOOKUP rather than VLOOKUP or XLOOKUP.

Related Functions

  • VLOOKUP: Searches a column for a key and returns a value from a specified column in the same row.
  • XLOOKUP: A more flexible lookup function that supports both rows and columns with customizable match modes.
  • HLOOKUP: Searches a row for a key and returns a value from a specified row in the same column.

Related Articles

Newsletter

More LOOKUP examples coming soon.

We are building short, practical updates for Sheets power users.