IF(ISBLANK)返回不正确的值 [英] IF(ISBLANK) returns incorrect value

查看:557
本文介绍了IF(ISBLANK)返回不正确的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下复制的是2个电子表格公式。 这个在J,M和N列中搜索空白值,或者如果存在则返回一个单元格值... 


= IF(ISBLANK(J2965),(IF(ISBLANK( M2965),(IF(ISBLANK(N2965),"",N2965)),M2965)),J2965)


此公式将空白值("")写入当满足条件时,单元格J2965 ...


= IF(ISBLANK(H2965),"","IF(ISNA(VLOOKUP(H2965,SLAMIS_LIN!A:G,7,FALSE) )),"",VLOOKUP(H2965,SLAMIS_LIN!A:G,7,FALSE)))


两个公式似乎都是正确的,但第一个是说那个单元格在第二个公式在其中写入空白值("")之后,J2965不为空("假")。 为什么第一个公式读作"假"?当我告诉
单元格时它是空白的? 是否有更好的方法将单元格声明为空,以便第1个公式正常工作?


解决方案

ISBLANK测试单元格是否完全为空,即它既不包含值也不包含公式。如果单元格包含返回"&"的公式,则它看起来为空,但由于公式,Excel不会将其视为空白单元格。


要解决此问题,请测试值是否为"":而不是ISBLANK(J2965),请使用J2965 ="""等


Copied below are 2 spreadsheet formulas.  This one searches for blank values in columns J, M and N, or returns a cell value if present... 

=IF(ISBLANK(J2965),(IF(ISBLANK(M2965),(IF(ISBLANK(N2965),"",N2965)),M2965)),J2965)

This formula writes a blank value ("") to cell J2965 when conditions are met...

=IF(ISBLANK(H2965),"",IF(ISNA(VLOOKUP(H2965,SLAMIS_LIN!A:G,7,FALSE)),"",VLOOKUP(H2965,SLAMIS_LIN!A:G,7,FALSE)))

Both formulas appear to be correct, but the 1st one is saying that cell J2965 is not blank ("false") after the 2nd formula has written a blank value ("") there.  Why does the 1st formula read "false" when I have told the cell it is blank?  Is there a better way to declare a cell blank so that the 1st formula will work correctly?

解决方案

ISBLANK tests whether a cell is completely empty, i.e. it contains neither a value nor a formula. If a cell contains a formula that returns "", it looks empty, but because of the formula, Excel does not treat it as a blank cell.

To get around this, test whether the value is "": instead of ISBLANK(J2965), use J2965="" etc.


这篇关于IF(ISBLANK)返回不正确的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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