Like the newer XLOOKUP function, LOOKUP can look up values in either rows or columns.

However, unlike XLOOKUP, LOOKUP can only perform an approximate match.

The second argument,lookup_vector, is the range or array to search.

Get value of last non-empty cell with LOOKUP

The third argument, result_vector, is the range or array from which to return a result.Result_vectoris optional.

Ifresult_vectorisnotprovided, LOOKUP returns thevalueof the match found inlookup_vector.

The LOOKUP function has two forms: vector and array.

Get value of last non-empty cell with LOOKUP

Most of this article describes thevectorform, but the last example below explains thearrayform.

In the screen below, the formula in F6 is:

Note the use of afull column reference.

This is not an intuitive formula, but it works well.

Get value of last non-empty cell with LOOKUP

Example #4 - array form

The LOOKUP function has an array form as well.

In either case, LOOKUP returns a value at the same position from thelastrow or column in the array.

The example below shows how the array form works.

Get value of last non-empty cell with LOOKUP

Note: Microsoft discourages the use of the array form and suggestsVLOOKUPandHLOOKUPas better options.

you’re free to use INDEX to retrieve individual values, or entire rows and columns.

MATCH supports approximate and exact matching, andwildcards(* ?)

Get value of last non-empty cell with LOOKUP

XLOOKUP supports approximate and exact matching, wildcards (* ?)

It is a more robust and flexible successor to the MATCH function.

XMATCH supports approximate and exact matching, reverse search, and wildcards (* ?)

Example of LOOKUP function to find latest price

The output from FILTER is dynamic.

If source data or criteria change, FILTER will return a new set of results.

This makes FILTER a flexible way to isolate and inspect data without altering the…

LOOKUP function array form example

Excel formula: Highlight approximate match lookup conditional formatting

Excel formula: Get last match

Excel formula: Get value of last non-empty cell

Excel formula: Get last entry by month and year

Excel formula: Lookup value between two numbers

Excel formula: Get last match cell contains

Excel formula: Get date associated with last entry

Excel formula: Get stock price (latest close)

Excel formula: Group numbers at uneven intervals

Excel formula: Lookup latest price

Excel formula: Average last 3 numeric values

Excel formula: Lookup last file version

Excel formula: Extract unique items from a list

Excel formula: SUMIFS vs other lookup formulas

Article image

Excel VLOOKUP function

Excel HLOOKUP function

Excel INDEX function

Excel MATCH function

Excel XLOOKUP function

Excel XMATCH function

Excel FILTER function

Get value of last non-empty cell with LOOKUP

Example of LOOKUP function to find latest price

LOOKUP function array form example