H
Harlan Grove
....Bernd P said:It is an optimisation on Tushar's LinearInterp UDF, not an
optimisation in the sense of a shorter formula. ....
But your suggestion ....
is volatile, value-dependant and quite complex for a beginner, for
example.
Whereas writing udfs is easy for a beginner?
Either formulas are going to be black boxes or udfs are. Either way, a
beginner isn't going to know what's going on.
Also, you dredged my formula from a different branch. It is volatile, so
that's a fair point. It doesn't have to be. You could use the array formula
=FORECAST(A7,IF(ABS(ROW(X)-MIN(ROW(X))+0.5-MATCH(A7,X))<=0.5,Y),
IF(ABS(ROW(X)-MIN(ROW(X))+0.5-MATCH(A7,X))<=0.5,X))
which will be shorter than alternatives calling INDEX twice for both X and Y
ranges. Still, Lori's formula further in this branch looks much better,
likely the most efficient approach.