Why not sort the XY table (or a copy of it) and use LINEST on the required
section of the sorted data?
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email
"Incoherent" wrote in message
...
I want to perform a 4th order curve fit on some values in an array.
I have a list of X values and a list of Y values, the X values are not in
any particular order and there are in some cases multiple instances of a
given X value. I want to make a curve fit on the Y data only when the
corresponding X values are between some set limits, set in seperate cells.
I have tried (where my limits are $A$1 and $B$1):
{LINEST(IF(X10:X100$A$1,IF(X10:X100<$B$1,Y10:Y100 )),IF(X10:X100$A$1,IF(X10:X100<$B$1,X10:X100^{1,2 ,3,4})))}
This gives #VALUE if the limits do not encompass the whole data X range. I
guess because this results in non contiguous data in the array...
Any smart ways around this?