用于检查多个条件并返回true / false的Excel公式

时间:2017-07-21 09:45:34

标签: excel formula

我需要一个公式来检查Excel中的2个条件。

在相同的ID +软件+数据集1 +价格

如果ID在同一软件下具有级别1和级别2,则级别1的价格应为零成本。否则,在同一软件下,1级不应为零成本。

有人可以为此提供帮助吗?

+--------+---------------+-----------+--------+---------+--------------------------------------------------------------------------------------+
|   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     |
+--------+---------------+-----------+--------+---------+--------------------------------------------------------------------------------------+

1 个答案:

答案 0 :(得分:0)

要检查多个条件,请使用AND()公式。

示例:

=AND(1>2; 11<17)

返回FALSE

=AND(1>2; 11<17)

返回TRUE