简体   繁体   中英

Excel formula for IF cell number is 'lower' than X, 'in between' X and Y or 'higher' Y then equals A, B, C

I can get a simple IF formula working like: =IF(A3>100,"good","bad")

but what i would like is something that works for in between theses values too.

Example:

A score of <80 = Bad , 80-100 = OK , >100 = Good Thanks.

使用INDEX()

=INDEX({"Bad","OK","Good"},MATCH(A3,{-1E+99,80,100}))

You embed if statements:

=IF(A3>100,"good",IF(A3>80,"OK","bad"))

(not that if the maximum score is 100, then you should use:

=IF(A3>=100,"good",IF(A3>80,"OK","bad"))

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