Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
RW
 
Posts: n/a
Default Passing Variable to LINEST

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
  #2   Report Post  
Max
 
Posts: n/a
Default

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
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"RW" wrote in message
...
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



  #3   Report Post  
Max
 
Posts: n/a
Default

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 ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


  #4   Report Post  
RW
 
Posts: n/a
Default

Thanks!!

"Max" wrote:

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 ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----



  #5   Report Post  
Max
 
Posts: n/a
Default

You're welcome !
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"RW" wrote in message
...
Thanks!!





  #6   Report Post  
Harlan Grove
 
Posts: n/a
Default

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use linest with variably sized data arrays? [email protected] Excel Worksheet Functions 0 April 13th 05 04:56 PM
LINEST bug with cubic polynomials in Excel 2003 byundt Excel Worksheet Functions 3 March 21st 05 02:15 PM
make a vlookup using a variable path Alex St-Pierre Excel Worksheet Functions 1 March 2nd 05 11:54 PM
I Need VBA Assistance for global variable question Brent E Excel Discussion (Misc queries) 1 March 1st 05 08:46 PM
change function variable prompts?? thinkingfield Excel Worksheet Functions 1 November 8th 04 04:01 PM


All times are GMT +1. The time now is 03:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"