Skip to main content
Version: Streamsheets 3.0

MATCH

Returns a relative position number of a matching cell inside a specified cell range.

Syntax

=MATCH(value, SearchRange, [Type])

Arguments

NameTypeDescription
valueNumberValue to search for.
SearchRangeRangeA cell range to search in.
Type (optional)NumberSearch type with the following options:
1: (Default) Find the largest value in cell range which is less than or equal to specified value. Table must be in ascending order.
0: Find the first value which match exactly specified value. Here the wildcards ? and * are supported.
-1: Find the smallest value in cell range which is greater or equal to specified value. Table must be in descending order.

Return

TypeDescription
NumberReturns relative position of in cell-range for given value or #NA if no match is found.

Examples

| |A|B| ||---|---|---| |1|2|3| |2|8|4| |3|1|3|

FormulaResultComment
=MATCH(4,B1:B3, 0)
2The index of the cell with the searched value is returned.
=MATCH(2,A1:B1, 0)
1The index of the cell with the searched value is returned.