简体   繁体   中英

Excel VLOOKUP show wrong results

I try to preprocess some excel documents with VLOOKUP function.

Disclaimer: This is not real data that I need to work on, but some demo data with same problem! 在此处输入图像描述

The vlookup function for left columns is

=VLOOKUP(B7;$D$6:$E$10;2;1)

and for right one is

=VLOOKUP(K11;$M$8:$N$13;2;1)

( of course, the first number is changing, B7, B8,...K11, K12, ....)

What is wrong:

On the left side, there appear as there is no key, but is is.

On the right side for lidija, the value should be j and not y.

I couldn't find what is wrong even though I search on the net quit a lot.

Some thinks that (it is obvious from picture and description) I already check :

(and it is stated as most frequent problems)

  1. I lock the cells (see code above)

  2. The key exist - you can see the key in table, and I do it with copy and paste

  3. It is not a space problem (I check that none of the cells have space at the end)

You are using 1 as 4th argument. This is only appropriate if the lookup range is sorted and you want a "closest match"

In unsorted data, as here, for an exact match you need a 4th argument of zero or FALSE like this

=VLOOKUP(B7;$D$6:$E$10;2;FALSE)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM