ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Evaluating Equations Based on Selection !! (https://www.excelbanter.com/excel-worksheet-functions/177741-evaluating-equations-based-selection.html)

monir

Evaluating Equations Based on Selection !!
 
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.

T. Valko

Evaluating Equations Based on Selection !!
 
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.




monir

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.





T. Valko

Evaluating Equations Based on Selection !!
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"monir" wrote in message
...
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.








All times are GMT +1. The time now is 02:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com