如果范围的最小值包含所有空值,则返回空单元格 [英] returning empty cell if minimum of a range contains all empty values

查看:126
本文介绍了如果范围的最小值包含所有空值,则返回空单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个公式,可以找到从AF4到A的下一个空单元格(从A4开始)的最小日期值.

I have a formula which find minimum date values from AF4 to next empty cell in A starting from A4.

=MIN(INDIRECT(ADDRESS(ROW(AF4);COLUMN(AF4))&":af"& (MIN(IF(A4:A108="";ROW(A4:A108))))))

我希望我的公式具有if else函数,并且如果AF4中的值到A中的下一个空单元格,则公式应像上面一样返回最小值.

I want my formula to have if else function and if there is a value in AF4 to next empty cell in A, formula should return minimum as it does above.

如果所有值都是空的,那么我希望公式返回空,它仍然受上述公式的约束,而不是标准日期00.01.1900.因此,基本上,我需要此公式的else函数来返回空单元格.

If all the values are empty then i would like that the formula returns empty which is still in constraints of the formula above and not a standard date which is 00.01.1900. So basically i need an else function to this formula which returns empty cell.

我该怎么做?

编辑:如果我的公式范围之间有任何日期值,我希望我的公式能够正常工作.如果范围内没有日期值,则应显示空字符串.然后应该是类似= If myformula(搜索范围内的最小日期)的东西,否则如果范围内没有日期,则它应该显示空字符串"

EDIT:I want my formula to work if there are any date values between the range in my formula. If there are no date values in the range, then it should show the empty string. It should be then something like =If myformula(which searches min date in range) else if there is no date in range then it should show empty string " "

推荐答案

您不能返回空单元格,因为其中包含公式的单元格不为空.您将获得默认值0.

You can't return an Empty Cell, as a cell with a formula in it is not empty. You will get a default value of 0 instead.

但是,您可以返回一个空字符串"":=IF(ISBLANK(A1),"",A1)

You can, however, return an empty string, "": =IF(ISBLANK(A1),"",A1)

这篇关于如果范围的最小值包含所有空值,则返回空单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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