ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Error in SERIESSUM (https://www.excelbanter.com/excel-worksheet-functions/9512-error-seriessum.html)

Thermal manager

Error in SERIESSUM
 
The function SERIESSUM(X,n,m,Coefficients) gives an error for X=0
How to solve it, the function is useless as it is?

Bernie Deitrick

Thermal,

0 raised to any power is still 0, so you could simply use

=IF(ISERROR(SERIESSUM(X,n,m,Coefficients)),0,SERIE SSUM(X,n,m,Coefficients))

HTH,
Bernie
MS Excel MVP

"Thermal manager" <Thermal wrote in
message ...
The function SERIESSUM(X,n,m,Coefficients) gives an error for X=0
How to solve it, the function is useless as it is?




Harlan Grove

Bernie Deitrick wrote...
0 raised to any power is still 0, so you could simply use


Only true for positive powers. For n < 0, 0^n should give #DIV/0!, and
0^0 is correctly undefined. However, in the context of SERIESSUM, X^0
should always be ignored and that term always treated as just the
[constant] coefficient.

=IF(ISERROR(SERIESSUM(X,n,m,Coefficients)),0,SERI ESSUM(X,n,m,Coefficients))


Not a general workaround. If n+k*m = 0 for some integer k, 0 <= k <
COUNT(Coefficients), then SERIESSUM should return the corresponding
[constant] coefficient when X = 0. So this should be

=IF(X=0,SUMPRODUCT(--(n+m*(ROW(INDIRECT("1:"&COUNTA(Coefficients)))-1)=0),
Coefficients),SERIESSUM(X,n,m,Coefficients))


Thermal manager

Well, I really think this is an error Microsoft should solve, the coder of
this function should be ashamed of such an error. In the mean time I improved
the function below to:

=IF(X= 0, a0, SERIESSUM(X,n,m,a0:ai)) as this avoids calculating the seriessum twice.


"Bernie Deitrick" wrote:

Thermal,

0 raised to any power is still 0, so you could simply use

=IF(ISERROR(SERIESSUM(X,n,m,Coefficients)),0,SERIE SSUM(X,n,m,Coefficients))

HTH,
Bernie
MS Excel MVP

"Thermal manager" <Thermal wrote in
message ...
The function SERIESSUM(X,n,m,Coefficients) gives an error for X=0
How to solve it, the function is useless as it is?






All times are GMT +1. The time now is 04:16 PM.

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