简体   繁体   中英

Excel nested IF statement

=If(ISBLANK(F3),IF(F3<E3, ʺYesʺ, ʺNoʺ))

Have tried many iterations of this code to reach two outcomes on a stock order sheet.

Result should return If Blank or cell difference is equal or greater than as "Yes" and "No" if smaller than.

Any help is appreciated.

Check your quotes. Excel uses simple quotes " not ʺ.

=If(ISBLANK(F3),IF(F3<E3, "Yes", "No"))

Instead of using ISBLANK(), use the following:

=IF(OR(F3="",F3>=E3),"No","Yes")

You have two options there as your question was not clear as to which cell was to be greater than or equal which.

The reason you want to use the F3="" instead of ISBLANK(F3), is that if you have a formula in F3 that returns "" as a result, that is not the same as a blank cell. If you want to be safer, you may want to consider wrapping the first F3 in a CLEAN(TRIM(F3)) to remove when someone may have entered a space in the cell.

也许这样:

=IF(OR(ISBLANK(F13),F13<E13),"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