Excel公式中嵌套的IF语句 [英] Nested IF Statements in Excel Formula

查看:162
本文介绍了Excel公式中嵌套的IF语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,以前言,我是这个Excel业务的一个完整的新手。我已经通过Google找到了类似的例子,如何做到这一点,所以我不认为我太远了:

So, to preface, I'm a complete novice at this Excel business. I've found similar examples via Google of how to do this, so I don't think I'm too far off:

=IF( AND(D6=FALSE, OR(ISBLANK(B10),B10=0) ),IF( AND(D6=TRUE,B10>=1)," ","Enter number of components"),"fail")

本质上,第一个IF块评估AND表达式的内容。如果该条件通过,我想评估第二个IF块(如果条件失败,它将向单元格回显错误)。

Essentially, the first IF block evaluates the contents of the AND expression. If that condition passes, I want to evaluate the second IF block (which will echo an error to the cell if the condition fails).

提前感谢您的帮助: )

Thanks in advance for your assistance :)

推荐答案

根据你的代码,你首先评估D6 = FALSE,当你成功的时候,你试图评估D6 = TRUE。从第一次评估,你已经知道这是错误的,所以你的逻辑是有缺陷的。

according to your code, you are first evaluating if D6=FALSE, when that comes true, you then are trying to evaluate if D6=TRUE. Well from the first evaluation you already know it's false so your logic is flawed.

在我看来,你可能只想评估一次

it seems to me that you may just want to evaluate once

=IF( AND(D6=FALSE, OR(ISBLANK(B10),B10=0) ), "Enter number of components", "Fail")

这篇关于Excel公式中嵌套的IF语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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