如果一个单元格为空,则应显示下一个单元格

时间:2022-01-06 22:17:45

I have a problem that if A2 is blank then B1 should show and if b2 also blank then c1 should show and if c2 also blank then d1 should show.

我有一个问题,如果A2是空白,那么B1应该显示,如果b2也是空白,那么c1应该显示,如果c2也是空白,那么d1应该显示。

So how can I create a formula?

那么我该如何创建一个公式呢?

Thanks in advance

提前致谢

1 个解决方案

#1


0  

The suggested nested IF()s solution:

建议的嵌套IF()的解决方案:

=IF(A2="",IF(B2="",IF(C2="",IF(D2="","",D$1),C$1),B$1),A$1)

For something a bit more scaleable, you could use:

对于可扩展的东西,您可以使用:

=IFERROR(INDEX(A$1:D$1,MATCH("*",A2:D2,0)),"")

#1


0  

The suggested nested IF()s solution:

建议的嵌套IF()的解决方案:

=IF(A2="",IF(B2="",IF(C2="",IF(D2="","",D$1),C$1),B$1),A$1)

For something a bit more scaleable, you could use:

对于可扩展的东西,您可以使用:

=IFERROR(INDEX(A$1:D$1,MATCH("*",A2:D2,0)),"")