简体   繁体   English

使用正确的 VLookup 公式从其​​他工作表获取值时出现 N/A 错误

[英]N/A error while using the correct VLookup formula to get value from other sheet

In excel, I was trying to get fund value of a particular mutual fund by using VLookup to search another sheet.在 excel 中,我试图通过使用 VLookup 搜索另一张表来获取特定共同基金的基金价值。 In the process, I am getting N/A error even if the VLookup formula seems correct.在此过程中,即使 VLookup 公式看起来正确,我也会收到 N/A 错误。 我试图从中获取“资产净值”的工作表,将“方案代码”作为输入搜索字符串

The below screenshot is of the sheet with the VLookup excel formula:下面的屏幕截图是带有 VLookup excel 公式的工作表:

使用了 vlookup 公式的工作表

Is there any issues with the vlookup formula that I am using here.我在这里使用的 vlookup 公式是否有任何问题。 =VLOOKUP(D4,Sheet1!$A$5072:$E$5075,5,FALSE) I have tried many version of the vlookup but to no avail. =VLOOKUP(D4,Sheet1!$A$5072:$E$5075,5,FALSE)我尝试了许多版本的=VLOOKUP(D4,Sheet1!$A$5072:$E$5075,5,FALSE)但都无济于事。 Could anyone please help?有人可以帮忙吗? Thanks!谢谢!

Cleaning the data is the best option, so that both values are either all text, or all numbers.清理数据是最好的选择,这样两个值要么全是文本,要么全是数字。

But a quick and dirty work aroubd would be to use to convert the text to numbers但是一个快速而肮脏的工作是用来将文本转换为数字

=INDEX($E$5072:$E$5075,MATCH(D4,VALUE($A$5072:$A$5075),0)) 

or或者

=XLOOKUP(D4,VALUE($A$5072:$A$5075),$E$5072:$E$5075,,0,1)

Agree with Chris Neilsen that this is most likely a case of different formatting between the lookup item vs lookup array.同意 Chris Neilsen 的观点,这很可能是查找项与查找数组之间格式不同的情况。 The left alignment implies that both are formatted as text.左对齐意味着两者都被格式化为文本。 Given this, just double check that both indeed are formatted as text vs. someone left-aligning a column of numbers.鉴于此,只需仔细检查两者是否确实被格式化为文本与某人左对齐一列数字。

Let us know if that doesn't solve the problem and we can walk you through replacing this formula with an Index+Match formula.如果这不能解决问题,请告诉我们,我们可以指导您使用索引 + 匹配公式替换此公式。

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

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