Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 43
Default Building Non-Contiguous Arrays For Use With Linest


Can anyone think of a simple way to accomplish this:

Goal - use the Linest function to create a regression against a series
of dynamic ranges.

Example:

Column A Column B Column C
Row 1 DATE DOW VALUES

1/1/08 =weekday(A2) V1
. . .
. . .
. . .
12/31/08 . .


Using the Linest function, I'd like to create a regression that looks
at

n # of rows back (so flexible enough to include all data or from this
point in time to a limited number of days/weeks back)


Tuesdays Values = F ( Prior Monday, Prior Sunday, Prior Saturday,
Prior Friday, Prior Thur, Prior Wed, Prior Tues)

I understand the linest function and how to use Index to find all the
coefficients, rsquared, errors, etc. so no worries there.
But how can I create the ranges that pull the data that select only
data from a particular day of the week. Yes I know I could
take lots of real estate and repeat the values across multiple
columns. But that seems like such a waste since the values already
exist.

Any thoughts to this puzzle?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 265
Default Building Non-Contiguous Arrays For Use With Linest

To return an array of values (Column C) where the corresponding weekday
(Column B) is Thursday (Weekday = 5)...

N(OFFSET(C2:C100,SMALL(IF(B2:B100=5,ROW(B2:B100)-ROW(B2)),ROW(INDIRECT("1
:"&COUNTIF(B2:B100,5)))),0,1))

To return an array of dates (Column A) where the corresponding weekday
(Column B) is Thursday (Weekday = 5)...

N(OFFSET(A2:A100,SMALL(IF(B2:B100=5,ROW(B2:B100)-ROW(B2)),ROW(INDIRECT("1
:"&COUNTIF(B2:B100,5)))),0,1))

Use these as your arguments for the LINEST function.

Hope this helps!

In article
,
Marston wrote:

Can anyone think of a simple way to accomplish this:

Goal - use the Linest function to create a regression against a series
of dynamic ranges.

Example:

Column A Column B Column C
Row 1 DATE DOW VALUES

1/1/08 =weekday(A2) V1
. . .
. . .
. . .
12/31/08 . .


Using the Linest function, I'd like to create a regression that looks
at

n # of rows back (so flexible enough to include all data or from this
point in time to a limited number of days/weeks back)


Tuesdays Values = F ( Prior Monday, Prior Sunday, Prior Saturday,
Prior Friday, Prior Thur, Prior Wed, Prior Tues)

I understand the linest function and how to use Index to find all the
coefficients, rsquared, errors, etc. so no worries there.
But how can I create the ranges that pull the data that select only
data from a particular day of the week. Yes I know I could
take lots of real estate and repeat the values across multiple
columns. But that seems like such a waste since the values already
exist.

Any thoughts to this puzzle?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 43
Default Building Non-Contiguous Arrays For Use With Linest

On May 17, 1:34*pm, Domenic wrote:
To return an array of values (Column C) where the corresponding weekday
(Column B) is Thursday *(Weekday = 5)...

N(OFFSET(C2:C100,SMALL(IF(B2:B100=5,ROW(B2:B100)-ROW(B2)),ROW(INDIRECT("1
:"&COUNTIF(B2:B100,5)))),0,1))

To return an array of dates (Column A) where the corresponding weekday
(Column B) is Thursday (Weekday = 5)...

N(OFFSET(A2:A100,SMALL(IF(B2:B100=5,ROW(B2:B100)-ROW(B2)),ROW(INDIRECT("1
:"&COUNTIF(B2:B100,5)))),0,1))

Use these as your arguments for the LINEST function.

Hope this helps!

In article
,

*Marston wrote:
Can anyone think of a simple way to accomplish this:


Goal - use the Linest function to create a regression against a series
of dynamic ranges.


Example:


* * * * * * *Column A * * * Column B * * * * *Column *C
Row 1 * *DATE * * * * * *DOW * * * * * * * * *VALUES


* * * * * * *1/1/08 * * * * * * =weekday(A2) * * V1
* * * * * * * . * * * * * * * * * *. * * * * * * * * * * * * .
* * * * * * * . * * * * * * * * * *. * * * * * * * * * * * * .
* * * * * * * . * * * * * * * * * *. * * * * * * * * * * * * .
* * * * * * *12/31/08 * * * * . * * * * * * * * * * * * .


Using the Linest function, I'd like to create a regression that looks
at


n # of rows back (so flexible enough to include all data or from this
point in time to a limited number of days/weeks back)

Thanks!!!!


Tuesdays Values = F ( Prior Monday, Prior Sunday, Prior Saturday,
Prior Friday, Prior Thur, Prior Wed, Prior Tues)


I understand the linest function and how to use Index to find all the
coefficients, rsquared, errors, etc. so no worries there.
But how can I create the ranges that pull the data that select only
data from a particular day of the week. Yes I know I could
take lots of real estate and repeat the values across multiple
columns. But that seems like such a waste since the values already
exist.


Any thoughts to this puzzle?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 43
Default Building Non-Contiguous Arrays For Use With Linest

Something seems a bit off.
Shouldn't Small have an array and a k value as parameters? What's the
K value in this equation?


On May 17, 2:15*pm, Marston wrote:
On May 17, 1:34*pm, Domenic wrote:

To return an array of values (Column C) where the corresponding weekday
(Column B) is Thursday *(Weekday = 5)...


N(OFFSET(C2:C100,SMALL(IF(B2:B100=5,ROW(B2:B100)-ROW(B2)),ROW(INDIRECT("1
:"&COUNTIF(B2:B100,5)))),0,1))


To return an array of dates (Column A) where the corresponding weekday
(Column B) is Thursday (Weekday = 5)...


N(OFFSET(A2:A100,SMALL(IF(B2:B100=5,ROW(B2:B100)-ROW(B2)),ROW(INDIRECT("1
:"&COUNTIF(B2:B100,5)))),0,1))


Use these as your arguments for the LINEST function.


Hope this helps!


In article
,


*Marston wrote:
Can anyone think of a simple way to accomplish this:


Goal - use the Linest function to create a regression against a series
of dynamic ranges.


Example:


* * * * * * *Column A * * * Column B * * * * *Column *C
Row 1 * *DATE * * * * * *DOW * * * * * * * * *VALUES


* * * * * * *1/1/08 * * * * * * =weekday(A2) * * V1
* * * * * * * . * * * * * * * * * *. * * * * * * * * * * * * .
* * * * * * * . * * * * * * * * * *. * * * * * * * * * * * * .
* * * * * * * . * * * * * * * * * *. * * * * * * * * * * * * .
* * * * * * *12/31/08 * * * * . * * * * * * * * * * * * .


Using the Linest function, I'd like to create a regression that looks
at


n # of rows back (so flexible enough to include all data or from this
point in time to a limited number of days/weeks back)


Thanks!!!!





Tuesdays Values = F ( Prior Monday, Prior Sunday, Prior Saturday,
Prior Friday, Prior Thur, Prior Wed, Prior Tues)


I understand the linest function and how to use Index to find all the
coefficients, rsquared, errors, etc. so no worries there.
But how can I create the ranges that pull the data that select only
data from a particular day of the week. Yes I know I could
take lots of real estate and repeat the values across multiple
columns. But that seems like such a waste since the values already
exist.


Any thoughts to this puzzle?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 265
Default Building Non-Contiguous Arrays For Use With Linest

In article
,
Marston wrote:

Something seems a bit off.
Shouldn't Small have an array and a k value as parameters? What's the
K value in this equation?


The array for the SMALL function is...

IF(B2:B100=5,ROW(B2:B100)-ROW(B2))

The K value for the SMALL function is actually an array of values...

ROW(INDIRECT("1:"&COUNTIF(B2:B100,5)))

As I mentioned in my previous post, the two formulas I offered each
return an array of values and are used as the arguments for the LINEST
function.

For example, select two cells in a horizontal range, let's say E2:F2,
enter something like the following formula...

=LINEST(N(OFFSET(C2:C100,SMALL(IF(B2:B100=5,ROW(B2 :B100)-
ROW(B2)),ROW(INDIRECT("1
:"&COUNTIF(B2:B100,5)))),0,1)),N(OFFSET(A2:A100,SM ALL(IF(B2:B100=
5,ROW(B2:B100)-ROW(B2)),ROW(INDIRECT("1
:"&COUNTIF(B2:B100,5)))),0,1)))

....and then confirm with CONTROL+SHIFT+ENTER, not just ENTER. If done
correctly, Excel will automatically place curly brackets around the
formula.

Does this help?


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
Linest baron2ci Excel Worksheet Functions 0 April 8th 08 12:46 AM
LINEST bug Mark Schreiber Excel Worksheet Functions 2 April 27th 07 07:26 PM
LINEST() Bove Farm Excel Worksheet Functions 1 May 29th 06 05:54 AM
How to use linest with variably sized data arrays? [email protected] Excel Worksheet Functions 0 April 13th 05 04:56 PM
Linest - Why did they do that? cseeton Excel Discussion (Misc queries) 2 March 11th 05 12:45 PM


All times are GMT +1. The time now is 10:06 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"