本文介绍了在vlookup结果中删除#N/A的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何修改此功能,以便如果B2在该单元格中没有任何内容,结果将只是一个空白单元格,而不显示#N/A?

How do I modify this function so that the result will merely be a blank cell rather than having #N/A show up if B2 has nothing in that cell?

认为我可能需要类似ISERROR的检查,但我不是100%知道我在做什么.

I think I might need something like an ISERROR check but I don't 100% know what I'm doing.

=VLOOKUP(B2,Index!A1:B12,2,FALSE)

谢谢!

推荐答案

如果您只想在B2为空白时返回一个空白,则可以针对该情况专门使用其他IF函数,即

If you only want to return a blank when B2 is blank you can use an additional IF function for that scenario specifically, i.e.

=IF(B2="","",VLOOKUP(B2,Index!A1:B12,2,FALSE))

或要从VLOOKUP返回带有任何错误的空格(例如,包括是否填充了B2,但VLOOKUP找不到该值),如果您具有 Excel 2007 或更高版本,即

or to return a blank with any error from the VLOOKUP (e.g. including if B2 is populated but that value isn't found by the VLOOKUP) you can use IFERROR function if you have Excel 2007 or later, i.e.

=IFERROR(VLOOKUP(B2,Index!A1:B12,2,FALSE),"")

在早期版本中,您需要重复VLOOKUP,例如

in earlier versions you need to repeat the VLOOKUP, e.g.

=IF(ISNA(VLOOKUP(B2,Index!A1:B12,2,FALSE)),"",VLOOKUP(B2,Index!A1:B12,2,FALSE))

这篇关于在vlookup结果中删除#N/A的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 16:15