Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there !
I want to create a math function that can emulate a series sum of any kind, for instance: series sum for i=1 to n (1/(i+2)^+B2) or whatever. For what I have seen in the help menu, there is a seriesum function but is a standard sin/cos series function and I couldn't find anything else. Can anyone help me doing this ? Thanks/brgds jj |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Joao,
You can use a User-Defined-Function, see sample code below. Of course, you will need to make it a little smarter if you want to use cell references for parameters. Used like =SeriesSum(B2,100) where B2 has the string, for example, 1/(i+2)^2 This would return the sum for 1 = 1 to 100 of 1/(i+2)^2 HTH, Bernie MS Excel MVP Function SeriesSum(Arg As String, N As Integer) As Double Dim i As Integer For i = 1 To N SeriesSum = SeriesSum + Evaluate(Replace(Arg, "i", i)) Next i End Function "Joao" wrote in message om... Hi there ! I want to create a math function that can emulate a series sum of any kind, for instance: series sum for i=1 to n (1/(i+2)^+B2) or whatever. For what I have seen in the help menu, there is a seriesum function but is a standard sin/cos series function and I couldn't find anything else. Can anyone help me doing this ? Thanks/brgds jj |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Bernie - great help.
Brgds Joao "Bernie Deitrick" <deitbe @ consumer dot org wrote in message ... Joao, You can use a User-Defined-Function, see sample code below. Of course, you will need to make it a little smarter if you want to use cell references for parameters. Used like =SeriesSum(B2,100) where B2 has the string, for example, 1/(i+2)^2 This would return the sum for 1 = 1 to 100 of 1/(i+2)^2 HTH, Bernie MS Excel MVP Function SeriesSum(Arg As String, N As Integer) As Double Dim i As Integer For i = 1 To N SeriesSum = SeriesSum + Evaluate(Replace(Arg, "i", i)) Next i End Function "Joao" wrote in message om... Hi there ! I want to create a math function that can emulate a series sum of any kind, for instance: series sum for i=1 to n (1/(i+2)^+B2) or whatever. For what I have seen in the help menu, there is a seriesum function but is a standard sin/cos series function and I couldn't find anything else. Can anyone help me doing this ? Thanks/brgds jj |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to program an excel macro to repeat a series of keystrokes? | Excel Discussion (Misc queries) | |||
The 'DATEDIF' Function is not listed on my Excel program. | Excel Worksheet Functions | |||
Using the Excel TEXT function within a VBA program | Excel Programming | |||
merging excel program with tdc finance program | Excel Programming | |||
program a function key | Excel Programming |