MATCH(seek,vector[,type])
MATCH function finds the row index of seek in vector and returns it.
If the area is longer than it is wide then the sense of the search is rotated. Alternatively a single array can be used.
-
The type parameter, which defaults to +1, controls the search:
-
If type = 1, MATCH finds largest value <= seek.
-
If type = 0, MATCH finds first value == seek.
-
If type = -1, MATCH finds smallest value >= seek.
-
For type = 0, the data can be in any order. * For type = -1 and type = +1, the data must be sorted. (And in these cases, MATCH uses a binary search to locate the index.)
-
If seek could not be found, #N/A is returned.