conditional formulae

F

fredtheengineer

I would like to create a conditional formula that would initiate an iterative
process such that: If X < Y, then increase a cell value by some value, then
recalculate the spreadsheet. Can this be done?
 
G

Gord Dibben

First...........a formula cannot increase another cell value, it can only
return values to the cell in which it is written.

You could write in C1 =IF(B1<A1,B1 + 16)

You may need sheet event code.................post a few more details on
what you would like to achieve.

i.e. which cells or values and what would "some value" be equal to


Gord Dibben MS Excel MVP
 
F

fredtheengineer

Thanks Gord,
The goal is to determine the depth of flow in a pipe not flowing full. I
have established a flow the pipe needs to carry. I have written formulae
that determines the flow in a pipe at a specific depth. I can compare the
given flow with the calculated flow. If the calculated flow is less than the
given flow, I want to increase the depth by some increment (say 0.01 feet),
recalculate, and repeat that process until the calculated flow is => the
given flow. So, the question is how do I increase the depth cell value then
recalculate the sheet? For example,
in C1 write: =if(Qcalc<Qgiven, then E1 + 0.01) the problem is that I need
the new value in C1 inserted back into E1 so I can calculate a new value for
Qcalc. Does that make any sense, or have I not explained it well?
Fred
 
M

MartinW

Hi Fred,

You could use a spinner from the Forms toolbar and have your formula
reference the same cell as the spinner. The spinner will only increment
or decrement the cell by 1 on each click so if you want 0.01 increments
you need to use a helper cell like this.

Say the spinner's cell link is G2, then in H2 put =G2/100,
You can then reference H2 in your formula.

To insert the spinner go to View>Toolbars>Forms.
Click on the spinner button (a broad up arrow on top of a broad down arrow)
Drag a square in your spreadsheet.
Right click on the spinner and select Format Control
and set your cell link and step increment etc.

HTH
Martin
 
B

Bob I

Would it not be better to have the depth returned when you enter the
desired flow rate?
 
Top