IF函数包含AND [英] IF function containing AND

查看:200
本文介绍了IF函数包含AND的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果单元格A和B为空,则C将= 0
AND / OR
如果单元格A和B不为零C will = A - B

任何人都可以帮我需要单元格C的公式?

解决方案

我猜想如果如果单元格A和B不是空的是重要的,建议: /(A1-B1)

  =(A1<>)* b  

虽然这不适用于IF或AND函数。如果IF至少稍长一点:

  = IF(OR(A1 =,B1 =),0 ,A1-B1)

其他人有不同的解释,所以我试图比较你有五个答案现已提供:





这些都非常相似可能已经弄乱了他们,但至少有两种解释可供选择。


If Cell A and B are Null then C will = 0
AND/OR
If Cell A and B are Not Null C will = A - B

Can anyone help I need the formula for Cell C?

解决方案

I'm guessing that the and in If Cell A and B are Not Null is significant and suggest:

=(A1<>"")*(B1<>"")*(A1-B1)  

though this does not apply IF or AND functions. With IF at least the very slightly longer:

=IF(OR(A1="",B1=""),0,A1-B1)  

Others have a different interpretation so I have tried to compare the five answers you have now been offered:

These are so very similar I may have muddled them up but it seems there are two interpretations at least, with a choice for both.

这篇关于IF函数包含AND的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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