Forum Discussion

Hin_Hin's avatar
Hin_Hin
Copper Contributor
Oct 14, 2022
Solved

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...
  • mtarler's avatar
    Oct 14, 2022
    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)

Resources