Linest

gary2312

New Member
Joined
Apr 8, 2004
Messages
23
Hi there,

I've got a LINEST function working on some data, however each month new data is added.

Is there anyway to get this function to look at the new data automatically? I'ev tried blank cells, #n/a#s and putting zeros in cells but the function doesn't like these. I was thinking a pivot table that updates somehow might work but I may be completely off target with that idea.

Thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
My y values go from H15:H105, however H15:H20 are blank cells and H69 onwards contains #n/a's as these are referenced in a graph but i dont want them plotted. The x yalues are in E15:E105.

Then next month, H69 will have a numeric value then H70 and so on.

The data is in a sheet called "seasonal decomposition"

I've tried zeros but this then gives a completely wrong answer as these are taken into account by the function as proper data values.

Cheers
 
Upvote 0
gary2312 said:
My y values go from H15:H105, however H15:H20 are blank cells and H69 onwards contains #n/a's as these are referenced in a graph but i dont want them plotted. The x yalues are in E15:E105.

Then next month, H69 will have a numeric value then H70 and so on.

The data is in a sheet called "seasonal decomposition"

I've tried zeros but this then gives a completely wrong answer as these are taken into account by the function as proper data values.

Cheers

I need the actual data range of data. Are these E20:E105 and H20:H105?
 
Upvote 0
well E21 is month 7 in my data, and H21 is where my first actual piece of data begins. I'm using a moving average model, so the first 6 months have no corresponding value.
 
Upvote 0
gary2312 said:
well E21 is month 7 in my data, and H21 is where my first actual piece of data begins. I'm using a moving average model, so the first 6 months have no corresponding value.

Define Y_vals as referring to:

=x!$H$21:INDEX(x!$H:$H,MATCH(9.99999999999999E+307,x!$H:$H))

Define X_vals as referring to:

=x!$E$21:INDEX(x!$E:$E,MATCH(9.99999999999999E+307,x!$E:$E))

Substitute your sheet name for x.
 
Upvote 0
If it helps, when I enter =MATCH(9.99999999999999E+307,$H:$H) it returns 68, which is the position of the last numeric value.

=INDEX($H:$H,MATCH(9.99999999999999E+307,$H:$H)) returns the value in position 68.

It just doesn't like the $H$21: at the beginning.
 
Upvote 0
gary2312 said:
If it helps, when I enter =MATCH(9.99999999999999E+307,$H:$H) it returns 68, which is the position of the last numeric value.

=INDEX($H:$H,MATCH(9.99999999999999E+307,$H:$H)) returns the value in position 68.

It just doesn't like the $H$21: at the beginning.

You have to define Y_vals and X_vals thru Insert|Name|Define. If you don't how, just post back.
 
Upvote 0
sorry to post yet again, when using the following formula:

=LINEST(INDEX($H:$H,MATCH(9.99999999999999E+307,$H:$H)),INDEX($E:$E,MATCH(9.99999999999999E+307,$E:$E))^{1,2})

I get #num! returned, i dunno if this is any help?
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top