Forum Discussion
A BASIC VLOOKUP PROBLEM
- Nov 01, 2019
Here you are:
=IFERROR(VLOOKUP(A1*1,Sheet1!$A$1:$B$190,2,0),VLOOKUP(TEXT(A1,"0"),Sheet1!$A$1:$B$190,2,0))
You're covered for numbers and text.
Anıl Adaş the underlying issue here is that VLOOKUP expects (especially when you specify "FALSE" in the "range lookup" field) ....VLOOKUP expects an exact match. I underscored, bolded, and italicized "exact" because it really means exact.
So even if you've gotten things to the point where all the fields are clearly text, even if numeric in content, IF there were a trailing space--invisible to the eye, but there nonetheless--that can cause VLOOKUP to fail to find the match. And that trailing space could be in the table you're searching OR in the reference field.
So when VLOOKUP is used--and it's a very powerful function, very useful; I think I read recently that it's historically been the third most commonly used function--it's important to realize that it "thinks" like a computer. You and I might see 760, whether text or numerals, as the same, but the computer doesn't. You and I might see "key word" and "key word " as the same, but the computer doesn't.
Hope that helps get beneath the surface.