VB Code:
Public Sub test()
Dim data() As POINT
Dim trendwerte() As POINT
Dim i As Integer
ReDim data(2000)
ReDim trendwerte(2000)
'Read data
For i = 0 To 1999
'Column 1 has just to X Values (for example 0,1,2........)
data(i).x = ActiveWorkbook.Sheets(1).Cells(i + 2, 1).Value
'Column 2 has the Y Values (like your example X^3 +/- randomvalue)
data(i).y = ActiveWorkbook.Sheets(1).Cells(i + 2, 2).Value
Next i
trendwerte = Trend(data, 3)
For i = 0 To 1999
'Column 3 recieves the trenddata
ActiveWorkbook.Sheets(1).Cells(i + 2, 3).Value = trendwerte(i).y
Next i
End Sub
I'm using the code as posted (including the Debug.Print for the formula).