TX Sheet Control

MATCH Function

Function

Return the position of a value in a row or column. lookup_value is the value to find and lookup_array a single row or column. match_mode 1 (the default) finds the largest value that is less than or equal to lookup_value in an ascending list, 0 finds the first exact match, with the wildcards * and ? for text, and -1 finds the smallest value that is greater than or equal to lookup_value in a descending list. Text is compared without regard to case. TX Sheet Control also accepts a fourth argument, search_mode: 1 (the default) searches from the first item, -1 from the last. A value that is not found, or a two-dimensional lookup_array, returns #N/A.

Syntax

MATCH(lookup_value, lookup_array, match_mode, search_mode)

Category: Lookup. Minimum arguments: 2. Maximum arguments: 4.

Available for supported offline calculation.

Examples

=MATCH(3,{1,2,3},0)

The formula returns 3, because 3 is the third item of the array.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

See Also