Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Can I do something like this?
A B 1 =F(A1) 2 =F(A2) 3 =F(A3) 4 etc 5 6 7 8 9 10 and define a function in a cell called F, say maybe =sin(X)? This would give me the ability to plot any function I can put in a cell. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You will have to calulate the various functions in separate columns, then
use INDIRECT to reference the desired column. See example: http://cjoint.com/?dqi70Wzv3V HTH -- AP "Bill Brehm " <<don't want any spam a écrit dans le message de ... Can I do something like this? A B 1 =F(A1) 2 =F(A2) 3 =F(A3) 4 etc 5 6 7 8 9 10 and define a function in a cell called F, say maybe =sin(X)? This would give me the ability to plot any function I can put in a cell. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=CHOOSE(my_func,SIN(table),COS(table),TAN(table))
Select which function you want by setting a cell named my_func to 1, 2 or 3 (max is 29). |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
What do you mean by 'table' here? is it referring to Ardus Petus'
suggestion? I was trying to look for a way to put a perhaps complicated function in only one cell rather than in every cell in the range covered by the range of arguments. I know I can do it with VB but looking for a way to do it on the spreadsheet only. Could array formulas be of any help? "Herbert Seidenberg" wrote in message oups.com... =CHOOSE(my_func,SIN(table),COS(table),TAN(table)) Select which function you want by setting a cell named my_func to 1, 2 or 3 (max is 29). |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Bill Brehm wrote...
Can I do something like this? A B 1 =F(A1) 2 =F(A2) 3 =F(A3) 4 etc .... and define a function in a cell called F, say maybe =sin(X)? This would give me the ability to plot any function I can put in a cell. The closest would be a udf like Function F(a As Variant) As Variant Dim fcn As String Application.Volatile True fcn = Evaluate("_F") fcn = Replace(fcn, "$$", CStr(a)) F = Evaluate(fcn) End Function where _F would be a defined name referring to the actual function you wanted to use, and $$ would be the token representing the argument to F(). Note: you can't have both a udf named F and a defined name named F. |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Assuming your data looks like this:
table results 0.00 0.00 0.15 0.15 0.31 0.30 0.46 0.44 .... ... 5.98 -0.30 6.13 -0.15 6.28 0.00 my_func 1 Table is the named range of numbers from 0.00 to 6.28 Select these numbers and Insert Name Define Names in Workbook table In the same manner, give the cell with the 1 the name my_func Fill the <results column with the formula given in the previous post. The column <results will now display the sine terms. You can now plot the first column (radians) vs the second (x y plot). To display the cosine, type in 2 in the my_func cell. Now let's add an arbitrary fourth function, a quadratic. Add Quad to the formula: =CHOOSE(my_func,SIN(table),COS(table),TAN(table),Q uad) Add this name to Names in Workbook Quad Refers to =0.58*table^2-1.78*table+2.34 Type 4 into my_func and the quadratic curve will appear in your graph. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reference Cell if Found in a IF function | Excel Worksheet Functions | |||
How can I reference a cell as the criteria in a count if function. | Excel Discussion (Misc queries) | |||
Lookup function returning reference, not value | Excel Worksheet Functions | |||
clock | Excel Worksheet Functions | |||
Dynamic Function Reference Question | Excel Discussion (Misc queries) |