WorksheetFunction.Forecast_Linear (Excel)

Calculates, or predicts, a future value by using existing values. The predicted value is a y-value for a given x-value. The known values are existing x-values and y-values, and the new value is predicted by using linear regression. You can use this function to predict future sales, inventory requirements, or consumer trends.

If x is nonnumeric, Forecast_Linear returns the #VALUE! error value. If known_y and known_x parameters are empty or contain a different number of data points, Forecast_Linear returns the #N/A error value. If the variance of known_x parameters equals zero, Forecast_Linear returns the #DIV/0! error value. The equation for Forecast_Linear is a+bx, where and and where x and y are the sample means AVERAGE(all known_x) and AVERAGE(all known_y).

Forecast_Linear (Arg1, Arg2, Arg3)


Dim dblArg1 As Double: dblArg1 = 
Dim dblForecast_Linear As Double
dblForecast_Linear = WorksheetFunction.Forecast_Linear(Arg1:=dblArg1, Arg2:=, Arg3:=)

Arguments

Arg1, Arg2, Arg3

Arg1 (Double) - x - the data point for which you want to predict a value.

Arg2 - known_y's - the dependent array or range of data

Arg3 - known_x's - the independent array or range of data