Forum Discussion

Jenny_053's avatar
Jenny_053
Copper Contributor
Jul 21, 2022
Solved

Excel - ifs + and/ or condition, didn't function

Hi there,    I am trying setting up the function of ifs + or / and. However, excel didn't show the correct answer as expected.    =IFS(OR(B14>0,C14>=6),"A",AND(B14=0,5>=C14>=3),"B",AND(B14=0,C14<...
  • JoeUser2004's avatar
    Jul 21, 2022

    Jenny_053  wrote:

    ``=IFS(OR(B14>0,C14>=6),"A",AND(B14=0,5>=C14>=3),"B",AND(B14=0,C14<=2),"C")``

     

    The syntax 5>=C14>=3 is not valid.  And it is redundant if the values in C14 are only integers that are zero or more.

     

    Also, the condition B14=0 is redundant if the values in B14 are only integers that are zero or more.

     

    OTOH, if B14<0 is possible, you are not covering all the conditions.

     

    So assuming B14<0 is not possible, your formula can be:

     

    =IFS(OR(B14>0,C14>=6), "A", C14>=3, "B", TRUE, "C")

     

Resources