简体   繁体   English

Excel VLOOKUP#不适用

[英]Excel VLOOKUP #N/A

What I am trying to achieve is matching two projects with eachother "Project No" in two tables, and return the "project name" in second table. 我要实现的目标是在两个表中将两个项目彼此匹配“ Project No”,然后在第二个表中返回“项目名称”。 When I do this I receive this error inside the cell error #N/A. 当我这样做时,我在单元格错误#N / A中收到此错误。

I have formated both tables into number value, but this does not solve the problem. 我已经将两个表都格式化为数字值,但这不能解决问题。

Anyone that has an idea what I can do in order to solve this problem. 任何有想法可以解决此问题的人。

Here is the first table (just a snapshot to give an idea). 这是第一个表(只是一个快照,可以给出一个想法)。

在此处输入图片说明

Here is the second table (just a snapshot to give an idea). 这是第二张表(只是一个快照,可以给出一个想法)。

在此处输入图片说明

The #N/A error indicates that Excel cannot find the value you've specified in the list in which you've told it look. #N / A错误表示Excel无法在您告诉它的外观的列表中找到您指定的值。 When I run into this, there are a few things I do to troubleshoot: 当我遇到这个问题时,我需要做一些事情来解决:

1) Make sure both columns are in the same format. 1)确保两列的格式相同。

You mention you've already done this (good job!) but sometimes formatting gets stuck in Excel. 您提到您已经完成了这项工作(很好!),但是有时格式会卡在Excel中。 One thing you can do is to highlight each range and use the text to columns feature (under the data tab) to convert it all to the same format. 您可以做的一件事是突出显示每个范围,并使用“文本到列”功能(在“数据”标签下)将其全部转换为相同格式。 Another option is to copy the range into Notepad or some other plain text editor and then copy it back into Excel to strip out any lingering formatting. 另一个选择是将范围复制到记事本或其他纯文本编辑器中,然后再将其复制回Excel中以消除任何残留的格式。

2) Double check your ranges. 2)仔细检查您的范围。

Make sure your Vlookup is looking to the correct range, and make sure that range is locked (ie $A$1:$D$100 rather than A1:D100), or else your ranges are going to slide around as you move drag the formula down your table. 确保您的Vlookup查找到正确的范围,并确保该范围已锁定(即$ A $ 1:$ D $ 100而不是A1:D100),否则当您向下移动公式时,您的范围将会滑动你的桌子。 If the range refers explicitly to a table address (eg Table1[#All]), then make sure every data point if validly within that table. 如果范围明确指向表地址(例如Table1 [#All]),请确保该表中的每个数据点均有效。

3) Make sure the range lookup parameter is set to FALSE 3)确保范围查找参数设置为FALSE

Range lookup is the last parameter of the vlookup, and determines whether the vlookup will find an exact match (set range lookup to FALSE) or a partial match (set range lookup to TRUE). 范围查找是vlookup的最后一个参数,它确定vlookup将查找完全匹配(将范围查找设置为FALSE)还是部分匹配(将范围查找设置为TRUE)。 Setting range lookup to TRUE can sometimes create errors like the one you've described. 将范围查找设置为TRUE有时会产生您所描述的错误。 I always set it to FALSE by default unless I need specifically need to set it to TRUE. 除非我特别需要将其设置为TRUE,否则我始终将其默认设置为FALSE。

4) Use the find and replace window to manually evaluate the formula 4)使用“查找和替换”窗口手动评估公式

If everything looks correct, copy the value you want to look up and paste it into the find and replace window to search for it. 如果一切看起来正确,请复制要查找的值,然后将其粘贴到“查找和替换”窗口中以进行搜索。 If Excel can't find it and you can see it in your list, something is definitely wrong with the formatting or else your file may have some degree of corruption. 如果Excel找不到它,并且您可以在列表中看到它,则说明格式肯定有问题,否则文件可能会受到一定程度的破坏。 If Excel can find the value, double check that it is within the range your vlookup is looking through. 如果Excel可以找到该值,请再次检查该值是否在您的vlookup浏览的范围内。

If fist table is the one with vlookup formula and second is a source it may mean that such Project No. doesn't exist in your source table. 如果第一个表是带有vlookup公式的表,第二个是源表,则可能意味着您的源表中不存在该项目号。 Did you check that possibility? 您检查了这种可能性吗?

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

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