Home > Back-end >  Nested If statements in Google sheets not working properly
Nested If statements in Google sheets not working properly

Time:02-26

I am trying to sort some salary expectations to different levels of jobs in google sheets and have created the formula below. I am expecting it to print entry-level, Mid Level, Senior Level and Blank in the ranges I have defined below.

However, it is only printing Senior Level where the cell values are over 50000 or blank.

What's wrong with my formula?

    =IFS(
0> $J2 < 30000, "Entry Level",
30000 >= $J2 < 50000 ,"Mid Level",
$J2 >=  50000, "Senior Level",
ISBLANK($J2),"Blank")

CodePudding user response:

You can't write 30000 >= $J2 < 50000, write instead and( $J2 >= 30000 , $J2 < 50000 )

complete formula

=if(isblank($J2),"Blank",if($J2<30000,"Entry level",if($J2<50000,"Mid level","Senior level")))

CodePudding user response:

use:

=IF((J2 > 0)     *(J2 < 30000), "Entry Level",
 IF((J2 >= 30000)*(J2 < 50000), "Mid Level",
 IF( J2 >= 50000), "Senior Level",
 IF(ISBLANK(J2),   "Blank", ))))

see: https://webapps.stackexchange.com/q/123729/186471

try:

=IF(J2="", "Blank", VLOOKUP(J2, 
 {0,     "Entry Level"; 
  30000, "Mid Level"; 
  50000, "Senior Level"}, 2, 1))
  • Related