Returns values along a linear trend.
構文
TREND(known_ys, [known_xs], [new_xs], [const])引数
known_ys必須
The set of y-values you already know in the relationship y = mx + b.
known_xs省略可能
The optional set of x-values you already know.
new_xs省略可能
The new x-values for which you want to return corresponding y-values.
const省略可能
A logical value specifying whether to force the constant b to equal 0.
The TREND function calculates a linear trend line through a given set of data points using the least squares method. It returns the y-values along that line for the specified new x-values.
=TREND({10,20,30}, {1,2,3}, {4})→40Predicts the y-value for x=4 based on the linear trend of the provided data.
Prepare your data
Organize your known y-values and x-values into separate columns or rows.
Apply the function
Enter the TREND function referencing your data ranges to calculate the predicted values.
If omitted, it is assumed to be the array {1, 2, 3, ...} of the same size as known_ys.