检查多个条件并返回真/假的Excel公式
我需要得到一个公式来检查Excel中的两个条件 相同ID+软件+数据集1+价格下 如果ID在同一软件下具有级别1和级别2,则级别1的价格应为零成本。否则,同一软件下的1级成本不应为零 有人能帮忙吗检查多个条件并返回真/假的Excel公式,excel,formula,Excel,Formula,我需要得到一个公式来检查Excel中的两个条件 相同ID+软件+数据集1+价格下 如果ID在同一软件下具有级别1和级别2,则级别1的价格应为零成本。否则,同一软件下的1级成本不应为零 有人能帮忙吗 +--------+---------------+-----------+--------+---------+--------------------------------------------------------------------------------------+ | ID
+--------+---------------+-----------+--------+---------+--------------------------------------------------------------------------------------+
| ID | Software | Dataset1 | Price | Result | Comments |
+--------+---------------+-----------+--------+---------+--------------------------------------------------------------------------------------+
| Alvin | Orange Level | 1 | 0 | TRUE | True because under same software, it has level 2 and therefore level 1 is zero cost |
| Alvin | Orange Level | 2 | 20 | NA | ignore |
| Julie | Orange Level | 1 | 10 | FALSE | False because under same software, it has level 2 so level 1 should be zero cost |
| Julie | Orange Level | 2 | 20 | NA | ignore |
| Jamie | Orange Level | 1 | 0 | TRUE | True because under same software, it has level 2 and therefore level 1 is zero cost |
| Jamie | Orange Level | 2 | 20 | NA | ignore |
| Jamie | Apple Level | 1 | 10 | TRUE | True because under same software, it has level 2 and therefore level 1 is zero cost |
| Jamie | Mango Level | 1 | 10 | TRUE | True because under same software, it has level 2 and therefore level 1 is zero cost |
| Steph | Orange Level | 1 | 0 | TRUE | True because under same software, it has level 2 and therefore level 1 is zero cost |
| Steph | Orange Level | 2 | 20 | NA | ignore |
| Steph | Apple Level | 1 | 0 | FALSE | False because under same software, it has level 2 so level 1 should be zero cost |
| Steph | Mango Level | 1 | 0 | FALSE | False because under same software, it has level 2 so level 1 should be zero cost |
+--------+---------------+-----------+--------+---------+--------------------------------------------------------------------------------------+
要检查多个条件,请使用
和()
公式
例如:
=AND(1>2; 11<17)
返回
TRUE
这仅适用于同一行吗?我需要能够查找整个列。它没有任何特定的行。为了简单起见,这里给出的示例使用了常数,如1
,但它们也可以是其他的,如单元格引用或其他公式。虽然将最后一段转换为表格很有帮助(做得好!),但从表格中不清楚确定结果的规则是什么。一种可能的解释是。。。对于(ID,软件)
成对,将最后一段转换为表格是有帮助的(干得好,伙计!)从表格中不清楚确定结果的规则是什么。一种可能的解释是。。。对于给定的(ID,软件)
对:如果该对同时存在Dataset1=1
和Dataset1=2
,则如果其价格为零,则该对的第一个实例的结果为真,否则为假;如果该对仅存在于Dataset1=1
中,则Result
在Price>0时为TRUE,在Price=0时为FALSE。该表未提供仅存在Dataset1=2
的配对示例。
=AND(1>2; 11<17)