[Table of Contents] [docx version]
SpreadsheetML Reference Material - Table of Contents
MATCH ( lookup-value , lookup-array [ , [ match-type ] ] )
Description: Locates the relative position of an array item that matches a specified value in a specified order. MATCH shall not distinguish between uppercase and lowercase letters when matching strings.
Arguments:
Name |
Type |
Description | ||||||||
lookup-value |
number, string, logical, name, reference |
The value to search for in lookup-array. If match-type is 0 and lookup-value is a string, the wildcard characters, question mark (?) and asterisk (*), can be used in lookup-value. A question mark matches any single character; an asterisk matches any sequence of characters. To locate a question mark or asterisk, precede that character with a tilde (~). | ||||||||
lookup-array |
array, reference |
A contiguous range of cells containing possible lookup values. | ||||||||
match-type |
number |
Specifies how lookup-value is matched with values in lookup-array, as follows:
|
Return Type and Value: number – The relative position of an array item that matches a specified value in a specified order.
However, if
• No match is found, #NUM! is returned.
• match-type's value is out-of-bounds, #NUM! is returned.
[Example:
MATCH(39,{25,38,40,41},1) results in 2
MATCH(41,{25,38,40,41},0) results in 4
end example]