我需要忽略 excel 2007 MIN 数组中的空白单元格,但我不断得到 0
这是我的数组:
{=MIN(IF('APRIL 2011'!E3:E999<>"",'APRIL 2011'!E3:E999
*('APRIL 2011'!E3:E999*('APRIL 2011'!D3:D999='APRIL TOTALS'!A2))))}
它仍然返回带有空单元格的零!
Here is the array I have:
{=MIN(IF('APRIL 2011'!E3:E999<>"",'APRIL 2011'!E3:E999
*('APRIL 2011'!E3:E999*('APRIL 2011'!D3:D999='APRIL TOTALS'!A2))))}
It still returns zeroes with empty cells!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用 ISBLANK() 函数来测试空白单元格。如果单元格 A1 为空,则
=A1=""
的计算结果为 true,=A1=0
的计算结果也是如此我不知道有什么表达式可以返回空值到一个单元格,所以我使用“”代替,如下所示:
You can use the ISBLANK() function to test for blank cells. IF cell A1 is blank, then
=A1=""
evaluates to true, and so does=A1=0
I don't know of an expression to return a blank value to a cell, so I use "" instead, like this:
嵌套你的条件。您正在尝试将 IF 条件与 (VALUE)*(TRUE/FALSE) 混搭,并且当 TRUE/FALSE 为 FALSE 时,您将乘以零。通过这种方式,您将丢弃空白单元格,但人为地为结果集的每一行(其中列 D <> )添加零。 “四月总计”!A2。
作为数组公式,
数组公式需要使用 Ctrl+Shift+Enter↵ 来完成(但您已经知道了!)。
Nest your conditions. You are trying to mashup IF criteria with (VALUE)*(TRUE/FALSE) and the when the TRUE/FALSE is FALSE, you are multiplying by zero. In this way, you are discarding blank cells but artificially seeding your result set with zeroes for every row where column D <> 'APRIL TOTALS'!A2.
As an array formula,
Array formulas need to be finalized with Ctrl+Shift+Enter↵ (but you already knew that!).
您的公式的问题是您返回的是布尔乘积数组中的最小值。因为这些是布尔乘积,所以乘数为 FALSE 的乘积(您打算排除的乘积)将计为 0。
只要E 列不包含零值,我就找到了解决此问题的方法。我对原始公式做了两个大的更改:
为了处理返回大量数字的情况,我将其设置为仅当 Col D 值 = A2 的 E 列中有非空值时才计算最小值。如果没有这样的值,则返回“”。
The issue with your formula is that you are returning the minimum of an array of Boolean products. Because these are Boolean products, products with a FALSE multiplier (the ones you intend to exclude) are counted as 0.
I see a way around this as long as Column E contains no zero values. I've made two big changes to your original formula:
To take care of the case where the large number will be returned, I've made it such that the Minimum value is calculated only if there are non-blank values in Col E for Col D values = A2. If there are no such values, "" is returned.