Reputation: 129
M11= 154,535 ; M18= 11,241 ; M22= =IF(M18>0,IF(M11>=120000, "SHARE","DON'T SHARE"))
M22 results in 'SHARE' which is the desired result.
O11= 157,600 ; O18= -16,586 ; O22= =IF(O18>0,IF(O11>=120000, "SHARE","DON'T SHARE"))
O22 results in 'FALSE' which is not the desired result.
What can be the issue (why doesn't it just show DON'T SHARE
)?
Upvotes: 0
Views: 64
Reputation: 637
Thats because O18 is less than 0 (-16,586), and you dont have an alternative for the first IF, "IF(O18>0", and when it fails, the logical return is FALSE.
Your formula must be like:
=IF(O18>0,IF(O11>=120000, "SHARE","DON'T SHARE"), "DON'T SHARE")
or
=IF((AND(O18>0,O11>=120000), "SHARE","DON'T SHARE")
I hope I've helped
Upvotes: 0
Reputation: 1728
You have two IF
statements, but only an Else
statement for the nested IF
You would need a second Else
=IF(O18>0,IF(O11>=120000, "Share", "Don't Share"), "Don't Share")
The IF format is
IF (CONDITION, VALUE_IF_TRUE, VALUE_IF_FALSE)
With formatting it's easier to spot. You are essentialy saying
IF (CONDITION,
IF (SECOND_CONDITION,
SECOND_CONDITION_TRUE,
SECOND_CONDITION_FALSE),
VALUE_IF_FALSE (EMPTY IN YOUR EXAMPLE))
Upvotes: 1
Reputation: 13984
Because you have a nested IF and already the first one returns "FALSE" ! Try it like this:
O11=-16,586; O18=157,600; O22= =IF(O18>0,IF(O11>=120000, "SHARE","DON'T SHARE"))
Upvotes: 0