简体   繁体   English

Excel VLookup #NV错误

[英]Excel VLookup #NV error

I'm trying to make a VLookup in Excel but I get everytime a #NV error. 我正在尝试在Excel中制作VLookup,但每次都会遇到#NV错误。

This is table EVENTS : 这是表EVENTS

活动

This is table TRACK : 这是表TRACK

跟踪

the formula on field F2 in table EVENTS is 表EVENTS中字段F2的公式为

=SVERWEIS(E2;TRACKS!$A$2:$B$52;1;FALSCH)

SVERWEIS is the word for VLOOKUP in the German version. SVERWEIS是德语版本中VLOOKUP的词。 FALSCH means wrong FALSCH表示错误

VLOOKUP compares the values in the first column of your reference target, you have your target values in the second. VLOOKUP比较参考目标的第一列中的值,目标值在第二列中。

Just swap VLOOKUP and the TEXT columns on your TRACKS sheet and it will work just fine. 只需在TRACKS表上交换VLOOKUPTEXT列,它就可以正常工作。

As has been mentioned, VLOOKUP (SVERWEIS) can only look to its right to find a value to correspond with a value in the left hand columns of a table. 如前所述,VLOOKUP(SVERWEIS)只能向右看以找到与表左栏中的值相对应的值。 The INDEX/MATCH combination is more flexible in this respect so if not to rearrange your columns I would suggest something like: INDEX / MATCH组合在这方面更加灵活,因此,如果不重新排列您的栏,我建议您执行以下操作:

=INDEX(A:A,MATCH(E2,B:B,0)) 

where TRACK is assumed to be in ColumnsA:B. 假设TRACK位于ColumnsA:B中。 Converting to German, perhaps: 转换为德语,也许是:

=INDEX(TRACKS!A:A;VERGLEICH(E2;TRACKS!B:B;0))

Try switching the columns in TRACKS around. 尝试切换TRACKS的列。

VLOOKUP bases it's lookup on the first column, so in your case, it's looking through column A (1, 2, 3, etc.) VLOOKUP在第一列上进行查找,因此,在您的情况下,它在A列(1、2、3等)中进行查找

If you want your VLOOKUP to be based on the text, it needs to be in A instead. 如果您希望VLOOKUP基于文本,则必须使用A代替。

ie

  | A      | B       |
----------------------
1 | TEXT   | VLOOKUP |
2 | Text1  | 1       |
3 | Text2  | 2       |
etc...

Then your function will be: 然后您的功能将是:

=SVERWEIS(E2;TRACKS!$A$2:$B$52;2;FALSCH)

Switching out the third argument because you now want the value from the second column 切换出第三个参数,因为现在您需要第二列中的值

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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