I am using the LINEST function to extract the coefficients from a second order polynomial graph using the following syntax

=LINEST(F3:F10;E3:E10^{1,2})

This formula is in an array of cells and the results it produces are good enough for what I have in mind.

However, the range of cells the trendline is constructed from is taken from another sheet using the index function.

=IF(B3<>"";(INDEX(DateWT!$5:$971;MATCH(B3;DateWT!$A$5:$A$971;0);25));#N/A)

Again this works OK but if the data isn't there it is set up to put a #N/A in the cell. This works on the graph i.e. it doesnt plot a value and doesnt fall over when there isn't any numerical data in the cell but the LINEST function returns a #value comment - I presume because there isnt a numerical value in the cell. Is there anyway I can make sure the LINEST function only uses the numerical values and not the comments or is there another way of putting a null value into a cell that wont be recognised by the chart OR the LINEST function??

Any help/suggestions would be greatly appreciated!!!

Thanks

Sy