excelexcel-match

Why does Excel MATCH() not find a match?


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?


Solution

  • 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)