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
 
gary2312 said:
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?

Just define Y_vals and X_vals using Insert|Name|Define. After that:

=LINEST(Y_vals,X_vals)

will suffice.
 
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
i think ive defined the names, but when using these in the lineast formula it returns #REF!

=LINEST(Duration,x^{1,2})

I assume this is correct?
 
Upvote 0
gary2312 said:
i think ive defined the names, but when using these in the lineast formula it returns #REF!

=LINEST(Duration,x^{1,2})

I assume this is correct?

What is Duration and what is x?
 
Upvote 0
Duration is my y values, so i went to insert/name/define and then put in your formula.

If i click on Duration in the names thing, this is what appears in the "refers to" box.

='Seasonal Decomposition'!$H$21:INDEX('Seasonal Decomposition'!$H:$H,MATCH(9.99999999999999E+307,'Seasonal Decomposition'!$H:$H))


Similarly x is my x values, which is the other formula u mentioned.

='Seasonal Decomposition'!$E$21:INDEX('Seasonal Decomposition'!$E:$E,MATCH(9.99999999999999E+307,'Seasonal Decomposition'!$E:$E))
 
Upvote 0
gary2312 said:
Duration is my y values, so i went to insert/name/define and then put in your formula.

If i click on Duration in the names thing, this is what appears in the "refers to" box.

='Seasonal Decomposition'!$H$21:INDEX('Seasonal Decomposition'!$H:$H,MATCH(9.99999999999999E+307,'Seasonal Decomposition'!$H:$H))


Similarly x is my x values, which is the other formula u mentioned.

='Seasonal Decomposition'!$E$21:INDEX('Seasonal Decomposition'!$E:$E,MATCH(9.99999999999999E+307,'Seasonal Decomposition'!$E:$E))

That appears OK, although x as name is a bit terse...

What did you mean by

x^{1,2}

in the LINEST formula?
 
Upvote 0
gary2312 said:
well when i have got the linest to work on data before, i wanted a quadratic trendline.

I found this website which explains why i used ^{1,2}

http://www.stfx.ca/people/bliengme/ExcelTips/Polynomial.htm

=LINEST(y's,x's^{1,2})

then pressing CTRL, SHIFT then Enter gives u 3 numbers which relate to the regression equation.

OK. Thanks.

=LINEST(duration,x) still gives #REF!

#REF! could mean the ranges duration and x are not equally sized. What do you get when you try:

=COUNTA(duration)

=COUNTA(x)
 
Upvote 0
=counta(duration) = 48

=counta(x) = 85

Is that because for duration there are a load of #n/a's at the bottom of the data?
 
Upvote 0
gary2312 said:
=counta(duration) = 48

=counta(x) = 85

Is that because for duration there are a load of #n/a's at the bottom of the data?

We defined duration and x independent of each other. I believe you'd want to use H-range to anchor your analysis: If so, then define

Lrow

as referring to:

=MATCH(9.99999999999999E+307,'Seasonal Decomposition'!$H:$H)

Then change duration's definition to:

='Seasonal Decomposition'!$H$21:INDEX('Seasonal Decomposition'!$H:$H,Lrow)

and x's definition to:

='Seasonal Decomposition'!$E$21:INDEX('Seasonal Decomposition'!$E:$E,Lrow)
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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