Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Smart formulas preset spreadsheet?

Status
Not open for further replies.

paulpatrick

Mechanical
Aug 27, 2005
49
0
0
GB
What I want to do is basically to set up a spread sheet that contains a bunch of formulas.
For example lets us the F=ma formula to illustrate.
I dont know any of these numbers initially...
Is there a way that I can set up a formula that will work out the remaining value if I know just two of these variables.
the first case f= ? I know m and know a
the second case i know f and I know m a=?
last one I know a and I know f m=?
I want to have input cells that I can enter any combination of two variable and get the third one out.
I want to use the minimum number of cells to achieve this too.
How do I do this in Excel.
I have seen it done somewhere I can remember but I want to have a preset spreadsheet with formulas to allow me to plug in known values and work things out with multiple arrangements lying around.
Is this possible?
 
Replies continue below

Recommended for you

TkSolver is probably what you're thinking of.

Otherwise, you'd need to use some of the Solver and VBA functionality

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529
 
I can see it done with 3 inputs for F, M & A, and a nested IF formula (4 cells used). The formula would look at the inputs and return one of the values given the presence of the other 2. You could even build text into the formula to return "a = "&(F/M), etc. It would be a really long formula, but it could work...
 
If all you're going to do is put down every possible equation, You could simply name cells with variable names and simply put each equation into a separate cell, using the defined names. Each equation would have an IF statement checking to see if any of its inputs are blank, and if so, that IF would output a blank. The one cell formula with all its variables defined will produce the right answer.

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529
 
To do the F=ma example in four cells, three input cells a, m, F, and one output cell. Enter values in the two knowns, and a keyword like "solve" in the third. For something simple like this, a nested if statement would work in the output cell, like:

= if (a = "solve",F/m,if(m = "solve", F/a,if(F = "solve", m*a)))

for more complex equations, the same thing can be accomplished in a user defined function.

= SolveFMA(F,m,a)
 
@IRstuff, I agree if it were my spreadsheet I would do it in 6 cells. 3 for inputs, 3 with IF statements looking for the existence of the other 2 variables and formula to provide result. I just wanted to encourage the single nested IF formula for the OP challenge of "least number of cells".
 
No worries; spreading things out does make the algorithmic process more maintainable

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529
 
Thanks Guys,
Im looking to make a spreadsheet with a lot of formulas. Kinda plug it in to get quick results etc.
I am inclined to go for the 4 cell approach.
3 cells for input and one for out put.

As for TKSolver I have not heard of it but I have blown my budget on MS Project so I can update my skills as everyone seems to want engineers to drive MS Project at the minute.

anyhow

Thanks
 
Status
Not open for further replies.
Back
Top