Passing Variable to LINEST

G

Guest

I am using the following formula:
=SUM(LINEST(A$3:A$6, B$3:B$6)*{61590,1})

I need to use a value from a cell rather than typing the value (61590 in the
above equation) into the formula each time. I have tried using quotes,
parentheses, brackets, etc. without any luck.

I am using Excel 2002. How is this done?

Thanks
 
M

Max

Perhaps try, array-entered
(i.e. press CTRL+SHIFT+ENTER):

=SUM(LINEST(A$3:A$6,B$3:B$6)*D2:E2)

where D2 will house: 61590 (say)
and E2 will contain: 1
 
M

Max

Maybe better to make the cell refs (D2:E2) absolute,
in case you're copying across, so try instead, array-entered:
=SUM(LINEST(A$3:A$6,B$3:B$6)*$D$2:$E$2)
Adapt to suit ..
 
H

Harlan Grove

Max wrote...
Perhaps try, array-entered
(i.e. press CTRL+SHIFT+ENTER):

=SUM(LINEST(A$3:A$6,B$3:B$6)*D2:E2)
....

Better still would be using SUMPRODUCT.

=SUMPRODUCT(LINEST(A$3:A$6,B$3:B$6),D2:E2)

However, if the E2 value were always 1 (for the constant term from the
regression coefficients), it'd make more sense to use TREND or
FORECAST.

=TREND(A$3:A$6,B$3:B$6,D2)

=FORECAST(D2,A$3:A$6,B$3:B$6)

You can drive screws with hammers and pound nails with screwdrivers,
but should you?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top