Posted to microsoft.public.excel.worksheet.functions
|
|
Evaluating Equations Based on Selection !!
Got the idea!
Thank you very much for your help.
"T. Valko" wrote:
Is there an elegant way of doing that ??
What's elegant to one is a mess to another!
Give your functions defined names through the menu InsertNameDefine.
List those names in a range of cells. Use this list as the source for your
drop down.
Use this formula to execute the selected function whe
A1:A5 is the range that holds the names of the functions
A10 is your drop down
=IF(A10="","",CHOOSE(MATCH(A10,A1:A5,0),Sum,Avg,Me dian,Max,Min))
The functions *must* be listed in the CHOOSE function in the same order that
they are listed in the range A1:A5.
Here's a small sample file that demonstrates this:
SelectFunction.xls 14kb
http://cjoint.com/?czelpt65WW
--
Biff
Microsoft Excel MVP
"monir" wrote in message
...
Hello;
I would very much appreciate your help.
1) I've developed 12 different (independent) equations y=fn(x), each
equation depends on the value of x::cell H30
2) Each equation is given a short descriptive/relevant name for easy
selection from a list. For example:
mon1 singular:: y = fn1(x)
mon2 discontinuity:: y = fun2(x)
............................
mon12 infinite:: y = fun12(x)
3) I used Data Validation in cell H5 to select from the list: mon1
singular,
mon2 discontinuity, ..., etc.
4) Now, depending on the selection in H5 from the pull-down list, I need
to
link the descriptive name to the relevant equation and return its value y
to
cell H38.
5) A nested IF in H38 would be horrible, very long, and most likely
wouldn't
work since it would involve more than the allowable max number of loops in
a
w/s nested IF.
6) On the other hand, having 12 FUNCTION() each representing an equation,
the use of w/s CHOOSE() function requires a numerical index!!
Is there an elegant way of doing that ??
Thank you kindly.
|