I’m using a spreadsheet formula for calculation of an exponential regression:

`=EXP(INTERCEPT(LN(OFFSET(Data.$H$5,ph2StartIndex,0,ph2EndIndex-ph2StartIndex+1,1)),OFFSET(Data.$D$5,ph2StartIndex,0,ph2EndIndex-ph2StartIndex+1,1)))`

but when stripped of the book-keeping it’s just the standard array formula given in HELP:

`=EXP(INTERCEPT(LN(Yarray,Xarray)))`

The problem is that a Y-variable can sometimes go to zero, which causes an ERR:502 exception because LN(0) is undefined. Since the Y-variables are themselves calculated, I could change 0 to 0.1 wherever it occurs, but that smacks of fiddling with the data.

Can anyone suggest a more elegant way of fixing the problem? Could the entries containing (y,x=0,x) be ignored by including a zero test in the above array formula? I see the built-in trend calculation doesn’t have this problem.

DavidL