简体   繁体   中英

IF AND Statement

I have the following If statement which is working the way I want it too.

However I need to add an extra condition where IF C7 has no data in it then it will show as 0. At the moment the cell the formula is in is showing #VALUE.

I think that I will need to use IF(AND however my attempts have failed me.

=IF(C6="BT",12.88+(C7-30)*0.6,IF(C7<35,4.3,4.3+(C7-35)*0.2))

Thanks

You could check for blanks first.

=If(c7="",0,IF(C6="BT",12.88+(C7-30)*0.6,IF(C7<35,4.3,4.3+(C7-35)*0.2)))

I just thought to add another approach I often use because I think it makes it easy to read is;

=If(c7="",0,1)*IF(C6="BT",12.88+(C7-30)*0.6,IF(C7<35,4.3,4.3+(C7-35)*0.2))

And there's another to skin this cat...

=Iferror(IF(C6="BT",12.88+(C7-30)*0.6,IF(C7<35,4.3,4.3+(C7-35)*0.2)),0)

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