The range A2:C8 contains rows of numbers. For each row, we want an indication of how many of the following conditions are met:
1. Num1 (column A) = 2
2. Num2 (column B) = 4
3. Num3 (column C) = 6
The following formula based on nested IF functions, is very complex:
=IF(A2=2,IF(B2=4,IF(C2=6,"All Conditions","Two Conditions"),IF(C2=6,"Two Conditions","One Condition")),
IF(B2=4,IF(C2=6, "Two Conditions","One Condition"),IF(C2=6,"One Condition","None of the Conditions")))
Is there a simpler way to achieve the same results?
Use the CHOOSE function as shown in the following formula:
=CHOOSE((A2=2)+(B2=4)+(C2=6)+1,"None of the Conditions","One Condition","Two Conditions","All Conditions")
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.