在Excel中输出一个NULL单元格值 [英] Output a NULL cell value in Excel

查看:687
本文介绍了在Excel中输出一个NULL单元格值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

从Excel中的公式返回空单元格

我有一个IF声明。如果一个单元格= n,那么做某事,否则输出NULL

I have an IF statement. If a cell = n, then do something, else output NULL

=IF(A1=5, "Success", NULL)   // #NAME?
=IF(A1=5, "Success", "NULL") // NULL (as in text, not actually NULL!)
=IF(A1=5, "Success", "")     // blank but not NULL
=IF(A1=5, "Success", 0)      // zero value but not NULL


推荐答案

正如您所说,您不能在excel公式中输出NULL。我认为这与公式本身导致单元格不能为空的事实有关。 是下一个最好的事情,但有时使用0是有用的。

As you've indicated, you can't output NULL in an excel formula. I think this has to do with the fact that the formula itself causes the cell to not be able to be NULL. "" is the next best thing, but sometimes it's useful to use 0.

- 编辑 -

根据您的评论,您可能需要查看此链接。 http://peltiertech.com/WordPress/mind-the-gap-图表空单元格/

Based on your comment, you might want to check out this link. http://peltiertech.com/WordPress/mind-the-gap-charting-empty-cells/

深入了解图形问题以及各种值所代表的内容,以及如何在图表上操作其输出。

It goes in depth on the graphing issues and what the various values represent, and how to manipulate their output on a chart.

我不熟悉VSTO我害怕。所以我不会那么多帮忙。但是,如果你真的把公式放在单元格中,那真的没办法。 ISBLANK()仅测试一个单元格是否为空白,它没有办法使其为空白。可以在VBA(和VSTO I imagine)中编写代码,这些代码将在工作表_change事件上运行,并更新各种值而不是使用公式。但是这样做会很麻烦,性能会很高。

I'm not familiar with VSTO I'm afraid. So I won't be much help there. But if you are really placing formulas in the cell, then there really is no way. ISBLANK() only tests to see if a cell is blank or not, it doesn't have a way to make it blank. It's possible to write code in VBA (and VSTO I imagine) that would run on a worksheet_change event and update the various values instead of using formulas. But that would be cumbersome and performance would take a hit.

这篇关于在Excel中输出一个NULL单元格值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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