Syntax
=MATCH(lookup_value, lookup_array, [match_type])Arguments
| Argument | Required | Description |
|---|---|---|
lookup_value | Required | The value to look for |
lookup_array | Required | A single row or column to search |
match_type | Optional | 1 (default) largest value less than or equal in an ascending list, 0 exact match, -1 smallest value greater than or equal in a descending list |
How to use MATCH
MATCH takes 2 required arguments and 1 optional argument. Type =MATCH( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=MATCH(39, {25,38,40,41}, 1)Result =MATCH(41, {25,38,40,41}, 0)Result =MATCH(40, {25,38,40,41}, -1)Result Related lookup and reference functions
- HLOOKUPLooks for a value in the first row of a table and returns the value in the same column from another row.
- INDEXReturns the value or reference at a given row and column of a range or array.
- INDIRECTReturns the reference written in a text value, such as "B3" or "Sheet2!A1:A10".
- LOOKUPFinds a value in a sorted row or column and returns the value at the same position in another row or column.
- OFFSETReturns a reference shifted a number of rows and columns from a starting reference, optionally with a new size.
- ROWReturns the row number of a reference, or of the cell with the formula when left out.
- ROWSReturns the number of rows in a range or array.
- TRANSPOSESwaps the rows and columns of a range or array.
- VLOOKUPLooks for a value in the first column of a table and returns the value in the same row from another column.