MATCH Function
MATCH Function
Summary
In MS Excel there are lot of lookup functions that can find
a certain value in a range of cells, MATCH is one of them. Basically, it
identifies a relative position or location of any item in a given range in the
cells. But it has also a limitation that if there is a duplicate value, it
gives the result which is found in the first number. MATCH can find or you can
say that it supports only approximate, exact and Wildcard (* ?) matches.
MATCH is an Excel function used to locate the first position
of a lookup value in a row, column or table. Often the INDEX function is
combined with MATCH to retrieve the value at the position returned by MATCH.
Purpose
Get the position of an item in an array
Return value
A number representing a position in lookup_array.
Syntax
=MATCH (lookup_value, lookup_array, [match_type])
Arguments
• lookup_value - The value to match in lookup_array.
• lookup_array - A range of cells or an array reference.
• match_type - [This is optional, means the formula works in
a very accurate way if you does not use this option but it is recommended that
it must be used for accurate result] 1 = exact or next smallest (default), 0 =
exact match, -1 = exact or next largest.
Usage notes
Use the MATCH function to get the position of a value in an
array. Match offers three different matching modes which makes it more flexible
than other lookup functions. When used with INDEX, MATCH can retrieve the value
at the matched position. MATCH returns a position.
Match type information
Match type is optional. If not provided, match type defaults
to 1 (exact or next smallest). When match type is 1 or -1, it is sometimes
referred to as "approximate match". However, keep in mind that MATCH
will find an exact match with all match types, as noted in the table below:
Note: Be sure to set match type to zero (0) if you require
an exact match. The default setting of 1 can cause MATCH to return results that
look "normal" but are in fact incorrect. I recommend always providing
a value for match_type as a reminder of what behaviour is expected. Basic exact
match when match type is set to zero MATCH performs an exact match. In the
example below, the formula in E2 is:
Basic exact match
When match type is set to zero MATCH performs an exact
match. Example:
=MATCH(B9,B2:B14,0)
How the formula works
Put ‘=’ sign where you want to apply the formula then type
MATCH formula after that open the bracket
Select the Toy name
Put the comma (,) to move to next criteria and select the
whole row
The last option is a match type. Although this is an
optional value, if you do not specify this, it will automatically put the value
but in that case it may be possible that the specified condition does not
fulfill your requirement so it is better to select that option too
So simply type here ‘0’ (Zero) to see the Exact Match and
close the bracket
The result will be
Basic approximate match
When match type is set to 1 MATCH will perform an approximate
match on values sorted A-Z, finding the largest value less than or equal to the
lookup value. In the example shown below, the formula in F2 is:
=MATCH(B3,B2:B14,1)
Basic wildcard match
When match type is set to zero (0) MATCH can perform a match
using wildcards. In the example shown below the formula in E3 is:
=MATCH(“b*”,B2:B13,0)
Notes
• MATCH is not case-sensitive.
• MATCH returns the #N/A error if no match is found.
• In case of duplicates MATCH returns the first match.
• If match_type is -1 or 1 the lookup_array must be sorted
as noted above.
• If match_type is 0, the lookup_value can contain the
wildcards.
• The MATCH function is frequently used together with the
INDEX function.
Comments
Post a Comment