#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Linest function

I am trying to nest other formulas into Linest with no success. I am trying
to set it up so users can change the range of cells that they want to run the
regression on without having to actually step into the formula.
This is an example of a formula:
=LINEST(Pivots!H28:H51,Pivots!F28:G51,TRUE,TRUE)
Can I embed another formula into Linest that would automatically change the
range?
Thank you,

Barna

PS: I am using Excel 2003
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Linest function

Barna wrote...
....
I am trying to set it up so users can change the range of cells
that they want to run the regression on without having to actually
step into the formula.

....
Can I embed another formula into Linest that would automatically
change the range?

....

Yes. LINEST needs single area ranges or arrays as 1st and 2nd
arguments, and any expressions that evaluate to single area ranges or
arrays could be used.

If you have the following named cells,

YCol column number of Y range
YTop row number of top row in Y range
YBot row number of bottom row in Y range

XLft column number of leftmost column in X range
XRgt column number of rightmost column in X range
XTop row number of top row in X range
XBot row number of bottom row in X range

Data refers to the entire worksheet containing X and Y ranges,
e.g., Data!1:65536

you could use these defined names to build dynamic range references
that could be used in LINEST calls.

=LINEST(INDEX(Data,YTop,YCol):INDEX(Data,YBot,YCol ),
INDEX(Data,XTop,XLft):INDEX(Data,XBot,XRgt),...)

Now XTop and YTop etc would likely be the same, so XTop and XBot could
just be simple references to YTop and YBot, respectively, but this
allows for some flexibility. The only thing that's absolutely
necessary is that XBot - XTop = YBot - YTop, i.e., X and Y ranges have
the same number of rows, so XBot might as well be defined as

=XTop+YBot-YTop

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
Excel 2003 Linest Function Bug JimK Excel Worksheet Functions 12 October 3rd 06 01:50 PM
Reverse output of the Linest function Nick Flyger Excel Worksheet Functions 2 October 2nd 06 08:02 AM
Using INDIRECT in INDEX(LINEST.. ) function Incoherent Excel Worksheet Functions 4 January 10th 06 04:42 PM
what is the max number of factors in Linest function apca Excel Worksheet Functions 1 October 14th 05 12:55 PM
Excluding 0s and blanks from a LINEST function Disco Excel Worksheet Functions 4 February 4th 05 04:54 AM


All times are GMT +1. The time now is 02:59 PM.

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

About Us

"It's about Microsoft Excel"