## Option 1: Regular functions

- Function
**CardinalSpline**calculates a cardinal spline, given input data points. It returns a string containing all the spline coordinates, separated by |. - Function
**extractSubString**splits a string into substrings, given a separator. It returns the*n*-th substring (from the start, or end), and can be used to split the spline string. This function is also used in example 1 of the Excel function reference file.

## Option 2: Array function

- Array function
**CardinalSplineArray**creates an array of output values instead of a string, and its VBA code shows how to create a user defined array function. In Excel you enter an array formula just like a regular formula, but afterwards press F2 followed by CTRL+SHIFT+ENTER, which will make { } appear around it.

**Download demo file**(63kB - downloaded 860 times)

**Remark**

- A Cardinal Spline can also handle (complicated)
**closed loops**: handy for (industrial) design purposes. Check 'Spline is closed?' in the download file.