In some cases, VLOOKUP returns the wrong results or no results at all. This might not be due to the wrong construction of the VLOOKUP formula but might be caused by leading and trailing spaces in the data.
See the example above to understand this phenomenon. See the spaces in column A of the data and notice that the VLOOKUP returns #N/A(Not available error).
Here is what the lookup data looks like
In such an instance, the VLOOKUP fails, to correct this you wrap the TRIM function around the data in column A. See formula below and the results are as expected
You can download the file
here
No comments:
Post a Comment