Pulling data from big excel datatable with incremental column in Vlookup or IndexMatch without zeros

那年仲夏 提交于 2019-12-01 11:07:55

If you are returning a text based result, you can append a zero-length string to the VLOOKUP function.

=VLOOKUP($C$3,Table1[#All],2, FALSE)&""

This will not alter the string returned but will not show a zero when the return value would be blank.

If you are returning numbers or dates then you have to check if the return value is blank.

=IF(LEN(VLOOKUP($C$3,Table1[#All],2, FALSE)), VLOOKUP($C$3,Table1[#All],2, FALSE), "")

Unfortunately, this is a double lookup much as we had to do to check for errors before the IFERROR function came along but so far, there is no native worksheet IFBLANK function.

A UDF IFBLANK could be easily written.

If you are sure that you only return numbers or empty cells, this would prevent a double lookup:

=IFERROR(VALUE(A1&" "),"")

In your case, substitute A1 with VLOOKUP($C$3,Table1[#All],2, FALSE)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!