I've been trying to call the Forecast.ETS
function from VBA code with Application.WorksheetFunction
, however I'm getting the "unable to get the forecast_ets
property of the worksheetfunction class error."
Sub test()
Cells(20, 5) = Application.WorksheetFunction.Forecast_ETS(Cells(5, 3).Value, _
Range(Cells(5, 3), Cells(20, 3)), _
Range(Cells(5, 2), Cells(20, 2)).Value)
End Sub
Cells(5,3).Value
is a date, same as Range(Cells(5,2),Cells(20,2)).Value
Range(Cells(5, 3), Cells(20, 3))
contains the historical values.