Beruflich Dokumente
Kultur Dokumente
Related Function:
CHOOSE Function
Match and Choose Functions
The Excel Match and Choose functions both work with arrays of data.
The Match function receives a value to lookup, and returns the postion of the value in the
array.
The Choose function receives a position and returns the value that has this position in the
array.
Basic Description
The Excel Match function looks up a value in an array, and returns the relative position of the
value within the array. The user can request either an exact match or can request the position of
the closest match (above or below), if an exact match is not found.
Wildcards
eg. the condition "A*e" will match all cells containing a text string beginning with "A" and
ending in "e".
The Match function can be used to match numeric values, logical values, or text strings. Note
that, when used with text strings, the function is NOT case-sensitive. So, for example, the text
strings "TEXT" and "text" will be considered to be a match.
Wildcards can be used with text strings, when the [match_type] argument is set to 0 (requiring an
exact match). This is illustrated in the examples below.
Formulas: Results:
A B A B C
1 cccc =MATCH( "aaaa", A1:A5, 0 ) 1 cccc 3 - matches "aaaa" so returns position 3
2 dddd =MATCH( "?eee", A1:A5, 0 ) 2 dddd 5 - matches "eeee" so returns position 5
3 aaaa =MATCH( "*b", A1:A5, 0 ) 3 aaaa 4 - matches "bbbb" so returns position 4
4 bbbb 4 bbbb
5 eeee 5 eeee
Note that, in the above examples, as the [match_type] argument is set to 0, the text strings in the
lookup_array (cells A1-A5) do not need to be ordered.
A B A B C
1 7 =MATCH( 4, A1:A6, 0 ) 17 3 - returns position 3
2 2 =MATCH( 8, A1:A6, 0 ) 22 5 - returns position 5
3 4 =MATCH( 10, A1:A6, 0 ) 3 4 #N/A - no exact match - returns error
41 41
58 58
6 11 6 11
As in the previous examples, as the [match_type] argument is set to 0, the values in the
lookup_array (cells A1-A6) do not need to be ordered.
Formulas: Results:
A B A B C
1 4 =MATCH( 6, A1:A6, 1 ) 14 2 - returns position 2
2 6 =MATCH( 8, A1:A6, 1 ) 26 3 - returns position 3 (closest value below 8)
3 7 =MATCH( 15, A1:A6, 1 ) 37 5 - returns position 5 (closest value below 15)
4 10 4 10
5 11 5 11
6 16 6 16
Note that the [match_type] argument could have been omitted from the functions in the above
spreadsheet, as this argument has the value 1 by default.
Further information and examples of the Excel Match Function can be found on the Microsoft
Office website.