Forum Discussion

Cableguy918's avatar
Cableguy918
Copper Contributor
Dec 20, 2023
Solved

IFS only pulling one of three criteria

Having trouble getting IFS function to read the the options I have listed and for some reason it is only acknowledging this first. I'm not getting errors, just pulls the first option for all three values. I think my formula is correct, I just don't know what I'm missing. Anyone's help would be greatly appreciated. 

 

=IFS(D6>49,_25, D6>74,_40,D6>99,_50,TRUE,"0") I labeled the cells to shorten the formula.

 

Results should be

above 49 = 25

above 74 = 40

above 99 = 50

 

Above 49 works correctly but it stays 25 at 75, or 100, or any other number above 49. 

  • Cableguy918 

    =IFS(D6>=99,50, D6>=74,40,D6>=49,25,TRUE,0)

     

    The IFS formula returns the first result for which the condition is TRUE. For the value 99 condition D6>=99 is true therefore result is 50. For the value 74 condition D6>=74 is true therefore result is 40 and so on.

  • Cableguy918 

    =IFS(D6>=99,50, D6>=74,40,D6>=49,25,TRUE,0)

     

    The IFS formula returns the first result for which the condition is TRUE. For the value 99 condition D6>=99 is true therefore result is 50. For the value 74 condition D6>=74 is true therefore result is 40 and so on.

    • Cableguy918's avatar
      Cableguy918
      Copper Contributor
      Would it then be possible to use AND in this formula?

      =IFS(AND(C6=Data!B6),D6>=99,50, D6>=74,40,D6>=49,25,TRUE,0)
      • OliverScheurich's avatar
        OliverScheurich
        Gold Contributor

        Cableguy918 

        =IFS(AND(C6=Data!B6,D6>=99),50, D6>=74,40,D6>=49,25,TRUE,0)

         

        Yes it's possible. Above formula returns the intended result in my sheet. I only changed the position of the closing bracket of the AND function. AND includes logical C6=Data!B6 and logical D6>=99 and the bracket is wrapped around both logicals.

Resources