Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Excel MATCH() not find a match?

Tags:

I have a table with some numbers stored as text (UPC codes, so I don't want to lose leading zeros). COUNTIF() recognizes matches just fine, but MATCH() doesn't work. Is there a reason why MATCH() can't handle numbers stored as text, or is this just a limitation I'll have to work around?

like image 471
Charlie Carwile Avatar asked Nov 02 '13 16:11

Charlie Carwile


People also ask

How do I use Excel to find a match?

The MATCH function searches for a specified item in a range of cells, and then returns the relative position of that item in the range. For example, if the range A1:A3 contains the values 5, 25, and 38, then the formula =MATCH(25,A1:A3,0) returns the number 2, because 25 is the second item in the range.

Why is Xlookup not finding a value?

When you see a #VALUE! error in your XLOOKUP function, the most likely reason is that your lookup array and your return array are not the same size. In my example, the reason the arrays are different sizes is that there is a blank cell at the end of my return array.

How do I get Excel to not find exact match?

If set to TRUE or "1" (which is the default) VLOOKUP will allow a non-exact match. If set to "0" or FALSE, VLOOKUP will require an exact match. In this case, we definitely want to allow a non-exact match because the exact sales amounts will not appear in the lookup table, so I'll use TRUE.

Why is the match function returning the wrong value?

Re: Index Match Match - wrong value returned Your problem was that your range of menu lookup and your definition to Table1 did not correspond. Once you have defined a table any names you need for validation or to identify parts of the table can be defined in terms of the structured references.


1 Answers

Functions like MATCH, VLOOKUP and HLOOKUP need to match data type (number or text) whereas COUNTIF/SUMIF make no distinction. Are you using MATCH to find the position or just to establish whether the value exists in your data?

If you have a numeric lookup value you can convert to text in the formula by using &"", e.g.

=MATCH(A1&"",B:B,0)

....or if it's a text lookup value which needs to match with numbers

=MATCH(A1+0,B:B,0)

like image 168
barry houdini Avatar answered Sep 27 '22 21:09

barry houdini