Spline Calculation Excel [best] -

: Use =TREND(known_ys, known_xs^1,2,3, target_x^1,2,3) to fit a cubic polynomial across your entire dataset. Note that this is not a piecewise spline, but a single global curve.

Assuming points in A2:A5 (x) and B2:B5 (y): spline calculation excel

Function CubicSpline(x As Double, xData As Variant, yData As Variant) As Double Dim i As Long Dim n As Long Dim h As Double Dim a As Double Dim b As Double Dim c As Double Dim d As Double : Use =TREND(known_ys

Compute (h_i = x_i+1 - x_i) and slopes.

) for each segment. This typically involves creating a tridiagonal matrix based on the distances between your -values and the changes in 3. VBA Macros (User Defined Functions) xData As Variant