使用if忽略空白单元格

时间:2022-02-20 11:51:59

I honestly don't see what I am doing wrong here. I am trying to see the minimum between three cells, and I want the result to ignore if one of those cells is blank or return nothing if they are all blank.

老实说,我不明白我在做错了什么。我试图看到三个单元格之间的最小值,并且我希望结果忽略其中一个单元格是空白还是如果它们都是空白则不返回任何内容。

I've tried (with an without spaces between the "")

我试过(“”之间没有空格)

=IF(ISBLANK("B21,B26,B31")," ",MIN(B21,B26,B31))

This gives me 0 if my cells are blank

如果我的细胞是空白的,这给我0

I also tried

我也试过了

 =IF((ISBLANK("E21,E26,E31"))),(MIN(E21,E26,E31),"")

Which doesn't do anything. I don't know how this can be wrong and it's obviously not a difficult problem but I can't seem to crack it despite the huge number of people who have asked similar questions before.

哪个什么都没做。我不知道这怎么可能是错的,这显然不是一个困难的问题,但我似乎无法解决它,尽管之前有大量的人问过类似的问题。

Thanks in advance

提前致谢

Lilou

1 个解决方案

#1


3  

Use AND() inside the IF:

在IF中使用AND():

=IF(AND(B21="",B26="",B31=""),"",MIN(B21,B26,B31))

All three must resove true for it to put "" in the cell or it will do the MIN().

所有这三个必须恢复为真,因为它将“”放在单元格中,否则它将执行MIN()。

#1


3  

Use AND() inside the IF:

在IF中使用AND():

=IF(AND(B21="",B26="",B31=""),"",MIN(B21,B26,B31))

All three must resove true for it to put "" in the cell or it will do the MIN().

所有这三个必须恢复为真,因为它将“”放在单元格中,否则它将执行MIN()。