Forum Discussion

jsillers's avatar
jsillers
Copper Contributor
Sep 27, 2022
Solved

IFS function

'In excel I'm trying to use the IFS function to say the following: if A1 is between 0-150, then return a value of "1." If A1 is between 151-300, then return a value of "2."  If A1 is between 301-450, then return a value of "3."

  • jsillers 

    =IF(AND(A1>=0,A1<=150),1,IF(AND(A1>=151,A1<=300),2,IF(AND(A1>=301,A1<=450),3)))

    An alternative is a nested IF formula. The syntax of IFS is a bit easier however.

     

    • OliverScheurich's avatar
      OliverScheurich
      Gold Contributor

      jsillers 

      =IF(AND(A1>=0,A1<=150),1,IF(AND(A1>=151,A1<=300),2,IF(AND(A1>=301,A1<=450),3)))

      An alternative is a nested IF formula. The syntax of IFS is a bit easier however.

       

      • jsillers's avatar
        jsillers
        Copper Contributor
        Great, thank you so much! It's just always hard figuring out where the AND and the parenthesis go...

Resources