GoogleSpreadsheet,VLOOKUP,单元格为空 [英] GoogleSpreadsheet, VLOOKUP with an empty cell

查看:114
本文介绍了GoogleSpreadsheet,VLOOKUP,单元格为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个键/值矩阵

1 | one
2 | two
3 | three
  | none

VLOOKUP 单元格

=VLOOKUP(A10,A1:B4,2,false)

如果单元格A10包含从1到3的任何数字,则可以,但是,如果单元格A10为空,则 VLOOKUP 返回:#N/A" -> _错误:在 VLOOKUP 评估中找不到值." _

If the cell A10 contains any number from 1 to 3 it is ok, but if the cell A10 is empty the VLOOKUP returns: "#N/A" -> _"Error: Did not find value '' in VLOOKUP evaluation."_

是否有可能使 VLOOKUP 与空单元格一起工作?

Any possibility to make VLOOKUP to work also with empty cells?

推荐答案

我找到了解决方案此处:

=IF(ISNA(VLOOKUP(A10,A1:B4,2,false)), B4, VLOOKUP(A10,A1:B4,2,false))

请检查B4无" 文本的硬编码位置,以便不使用自身的 VLOOKUP 提取该文本.

Check that B4 is the hardcoded position of the "none" text so this is extracted not using the VLOOKUP it self.

我真的希望有人带来一些不太丑陋的东西;)

I really hope someone comes with something less ugly ;)

这篇关于GoogleSpreadsheet,VLOOKUP,单元格为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆