Forum Discussion
Hin_Hin
Oct 14, 2022Copper Contributor
IFS and AND functions possible in the same cell?
Hello, I was wondering if you are able to do an IFS and AND statement in the same cell. I was able to do an =IF(AND) statement, but would like to do multiple in the same cell and from what I...
- Oct 14, 2022short answer is yes it is possible. The only differences between IF() and IFS() is that IF() has only 1 conditional with 2 possible results/outputs. IFS() on the otherhand is a whole series of conditional - output pairs and it will 'go down the line' of conditionals until it finds one that is true and then return the result from that corresponding output. IFS() is the same as IF( condition1, out1, IF( condition2, out2, IF( condition3, out3, ... without all those nested IF() statements and the corresponding set of ))))))) at the end. There is 1 other difference in that ALL the entries in an IFS() statement are calculated (even for conditions that evaluate to be false) while non-array based IF() statements will only calculate either the true or false statements.
You can ALSO consider using SWITCH:
=SWITCH( IF(E4="No", D4, "xxx"), J5, K5, J4, K4, J3, K3, F4*L5)
mtarler
Oct 14, 2022Silver Contributor
short answer is yes it is possible. The only differences between IF() and IFS() is that IF() has only 1 conditional with 2 possible results/outputs. IFS() on the otherhand is a whole series of conditional - output pairs and it will 'go down the line' of conditionals until it finds one that is true and then return the result from that corresponding output. IFS() is the same as IF( condition1, out1, IF( condition2, out2, IF( condition3, out3, ... without all those nested IF() statements and the corresponding set of ))))))) at the end. There is 1 other difference in that ALL the entries in an IFS() statement are calculated (even for conditions that evaluate to be false) while non-array based IF() statements will only calculate either the true or false statements.
You can ALSO consider using SWITCH:
=SWITCH( IF(E4="No", D4, "xxx"), J5, K5, J4, K4, J3, K3, F4*L5)
You can ALSO consider using SWITCH:
=SWITCH( IF(E4="No", D4, "xxx"), J5, K5, J4, K4, J3, K3, F4*L5)
- Hin_HinOct 17, 2022Copper ContributorThank you for your response! The SWITCH function was actually incredibly helpful.