简体   繁体   中英

Nested IF Statement in Excel Function

I am writing an excel function that basically says this:

If B2 is blank, do nothing.

If B2 has text in it, then check to see if I2 is blank.

If I2 is blank, then check to see if H2 is less than Zero.

If H2 is less than Zero, return "No", otherwise return "Yes"

If I2 is NOT blank, then check to see if I2 is less than Zero.

If I2 is less than Zero, return "No", otherwise return "Yes"

I have written the function as below, however, I am getting an error. I have looked it over numerous times and I am not sure what is wrong. A pair of fresh eyes and help is much appreciated.

IF(B2="", "", (IF(I2="", (IF H2<0, "No", "Yes"), IF(I2<0, "No", "Yes"))))

您的(在错误的位置:

=IF(B2="", "", IF(I2="", IF( H2<0, "No", "Yes"), IF(I2<0, "No", "Yes")))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM