The MATCH function
The =MATCH(G3,B3:B12,0)
formula in cell H3 of the MATCH and INDEX worksheet in Figure 10.2 returns 2 because it found Long Beach in the second row of the B3:B12
range:
Figure 10.2 – The MATCH function
The MATCH
function has three arguments:
- Lookup_value – What to look for, which, in the case of cell H3, is the contents of cell
G3
. - Lookup_array – This can be a row, column, or array to search; in the case of cell H3, it is the
B3:B12
range. - Match_type – This optional argument offers three choices:
- -
1
– Find the closest match that is equal to or less thanlookup_value
. 0
– Find an exact match withlookup_value
, which I specified in cell H3.1
– Find the closest match that is equal to or greater thanlookup_value
. This is the default value forMATCH
if you don’t specify the third argument.
- -
The =MATCH(G8,B3:B12,0)
formula in cell H8 of Figure 10.2 returns #N/A
because...