I am having some difficulty coming up with the excel version of the following function:

f(x) = (T_{1}- T_{0})L_{0}+ (T_{2}-T_{1})L_{1}+ (T_{3}- T_{2})L_{2}+ ... + (x - T_{n})L_{n}

Constraints:

T_{0}=0

T_{k-1}<=T_{k}

T_{n}<= x <= T_{n+1}

T_{n}and L_{n}reside in a couple of columns.

n is variable. Both as a number of entries and as an argument to the function.

How would I translate this to an excel cell?

## Bookmarks