Home > Mobile >  Nested IF statements on Excel
Nested IF statements on Excel

Time:06-08

I'm trying to code the following on excel:

  • if x is >=3 and <3.5, return "mild burnout"
  • if x is >= 3.5, return "severe burnout"
  • if x is <3, return "no burnout"

I have tried this:

=IF(AH2>=3,"mild burnout",IF(AH2>3.5,"severe burnout",IF(AH2<3,"no burnout")))

However, it does not return "severe burnout" values.

I believe thats because I can't seem to enbed the "and" in this formula.

What i would like to achieve(without success) is:

=IF(AH2>=3 AND AH2<3.5,"mild burnout",IF(AH2>=3.5,"severe burnout",IF(AH2<3,"no burnout")))

This one does not work

CodePudding user response:

Try:

=IF(A1<3,"no",IF(A1<3.5,"mild","severe"))&" burnout"

CodePudding user response:

Try:

=IF(AH2>=3.5,"severe burnout",IF(AH2>=3,"mild burnout",IF(AH2<3,"no burnout")))

This way you don't need the extra complication of and()

You can also use a table and vlookup like so to achieve the same result, but it is not an answer to the question about nested if:

enter image description here

Which has the advantage of being easier to edit and you can extend the categories easily.

CodePudding user response:

Try-

=IF(AH2<3,"no burnout",IF(AND(AH2>=3,AH2<3.5),"mild burnout",IF(AH2>=3.5,"severe burnout","something else")))
  • Related