Reputation: 13
I need to get a formula to check for 2 conditions in Excel.
Under same ID + Software + Dataset1 + Price
if a ID has level 1 and level 2 under same Software, the price for level 1 should be zero cost. Otherwise, level 1 should not be zero cost under same software.
Can someone help on this?
+--------+---------------+-----------+--------+---------+--------------------------------------------------------------------------------------+
| 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 |
+--------+---------------+-----------+--------+---------+--------------------------------------------------------------------------------------+
Upvotes: 0
Views: 633
Reputation: 71
To check for more than one condition, use the AND()
formula.
Example:
=AND(1>2; 11<17)
returns FALSE
=AND(1>2; 11<17)
returns TRUE
Upvotes: 0