Hello,

I am trying to calculate the slope of a set of data points, which are within a certain range.

The function I am using is:

=SLOPE(IF(AND(K14:K756>=I5,K14:K756<=I6),K14:K756),IF(AND(K14:K756>=I5,K14:K756<=I6),F14:F756))

Where K14:K756 are the y-values, F14:F576 are the x-values. And then I5 and I6 are the conditions.

Can anyone help me?

Thanks!