If statement - can it stop once a conditon is reached?

M

mike

Hello

Is their a way for the IF statement to stop calculating once one of
the conditions has been reached?

For example

A B C D
1 Symbol: Last: Limit: Status:
2 IBM-US 105.28 105 open


Cell D2 =IF(C2<=B2,"filled","open")

Is there a way from keeping the status from changing back
from "filled" to "open." In other words the
status can only go from "open" to "filled" and
remained as "filled" once the condition is met regardless of what
happens to either cells B2 or C2 afterwards.

Thank you

Mike
 
J

jamescox

After you enable iterative calculations (Excel Options | Formulas
Calculation Options | check the Enable iterative calculations checkbox
this works - but the values in B and C have to be set before you past
the formula into D

=IF(D4="Filled","Filled",IF(C4<=B4,"Filled","Open"))

if a simple 'less than' rather than a 'less than or equal to' woul
work, you could paste this formula into rows where the C and D cell
were blank.

In either case, when a cell refers to its own value, you are setting u
a circular calculation and the iterative calculation setting has to b
enabled.

Hope this really works the way you are expecting it to..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top