Forum Discussion

npucmyn's avatar
npucmyn
Copper Contributor
Mar 05, 2021
Solved

IFS and AND functions

Hello guys!   Looking for a help with a formula:   =IFS(test_array=0%, 1, AND(test_array>=0,1%, test_array<=9,99%), 2, AND(test_array>=10%, test_array<=59,9%), 3, test_array>=60%, 4)   As you c...
  • HansVogelaar's avatar
    Mar 05, 2021

    npucmyn 

    Your screenshot appears to indicate that you use point as decimal separator, so you should use 0.1% instead of 0,1% in the formula, etc.

     

    =IFS(test_array=0%, 1, AND(test_array>=0.1%, test_array<=9.99%), 2, AND(test_array>=10%, test_array<=59.9%), 3, test_array>=60%, 4)

     

    I would do it as follows:

     

    =IFS(test_array=0%, 1, test_array<10%, 2, test_array<60%, 3, test_array>=60%, 4)

     

    or

     

    =IF(test_array=0%, 1, LOOKUP(test_array, {0, 0.1, 0,6}, {2, 3, 4}))