TREND

Fits a linear trend using the least squares method.

Sample Usage

TREND(B2:B10,A2:A10)
TREND(B2:B10,A2:A10,A11:A13,FALSE)

Syntax

TREND(known_data_y, known_data_x, [new_data_x], [constant])

  • known_data_y - The array or range containing dependent (y) values.
  • known_data_x - The array or range containing independent (x) values corresponding with known_data_y.
  • new_data_x - [OPTIONAL] The array or range containing new x-values for which you want the corresponding y-values.
  • constant - [OPTIONAL] A logical value that determines whether to calculate the constant ‘b’ or to set it to 0.
    • If set to TRUE or omitted, b is calculated normally.
    • If set to FALSE, b is set equal to 0 (zero) and the m-values are adjusted so that y = mx.


Examples

TREND(B2:B10,A2:A10) 
TREND(B2:B10,A2:A10,A11:A13,FALSE)