=IF(M2="", "-", IF($G:$G="Guadalajara", IF(AND(M2>=62,Q2>=53), "1", "0"), IF($G:$G="Iloilo", IF(AND(M2>=60,Q2>=75), "1", "0"), IF($G:$G="Pampanga", IF(AND(M2>=65,Q2>=75), "1", "0"), IF($G:$G="Pioneer", IF(AND(M2>=60,Q2>=75), "1", "0"), IF($G:$G="Santa Rosa", IF(AND(M2>=65,Q2>=75), "1", "0"), IF($G:$G="Guadalajara", IF(AND(M2>=62,Q2=""), "-", "0"), IF($G:$G="Iloilo", IF(AND(M2>=60,Q2=""), "-", "0"), IF($G:$G="Pampanga", IF(AND(M2>=65,Q2=""), "-", "0"), IF($G:$G="Pioneer", IF(AND(M2>=60,Q2=""), "-", "0"), IF($G:$G="Santa Rosa", IF(AND(M2>=65,Q2=""), "-", "0"))))))))))))
There are a bunch of conditions for this one and I need almost 10 nested ifs. I realized when I entered this formula, there's a max.
The conditions are
if M2 is blank = "-"
if M2 is available but greater than or equal to (a certain threshold) and Q2 is blank = "-"
if M2 is available but less than (a certain threshold) and Q2 is blank = "0"
The $G:$G is the target location:
If site = “Guadalajara”
If M2 is g/e 62 but Q2 is less than 53 = 0 (and vice versa)
If M2 is g/e 62 and Q2 is g/e 53 = 1
If site = “Iloilo”
If M2 is g/e 60 but Q2 is less than 75 = 0 (and vice versa)
If M2 is g/e 60 and Q2 is g/e 75 = 1
If site = “Pampanga”
If M2 is g/e 65 but Q2 is less than 75 = 0 (and vice versa)
If M2 is g/e 65 and Q2 is g/e 75 = 1
If site = “Pioneer”
If M2 is g/e 60 but Q2 is less than 75 = 0 (and vice versa)
If M2 is g/e 60 and Q2 is g/e 75 = 1
If site = “Santa Rosa”
If M2 is g/e 65 but Q2 is less than 75 = 0 (and vice versa)
If M2 is g/e 65 and Q2 is g/e 75 = 1
(not actual code but logic)
How can I simplify it? I tried reversing it but it's giving me an error message.
Thanks!
Bookmarks