#### Trend Line - Equation

```I have a chart with a trendline, with the equation for the trendline
displayed in the chart.

How can I either format the equation or reference thecomponents of the

The display says y = 27.894x - 1E+06
and I would like to be able to at least display the second number
differently, and preferably be able to reference thetwo numbers

Can this be done (I am using Excel 2000)

Thank you
Rich 80205
```
 0
rich80105 (6)
6/3/2006 4:51:19 AM
excel 39879 articles. 2 followers.

3 Replies
443 Views

Similar Articles

[PageSpeed] 46

```Hi Rich,

Your equation is in the form  y = mx + c where
c = Y- Intercept

Use the function SLOPE to return the gradient value and
Use the function INTERCEPT to return the Y-Intercept value

For example if your x values were in A1 to A7 and your y values
were in B1 to B7 then your formula for slope would be

=SLOPE(B1:B7,A1:A7)

HTH
Martin

```
 0
mtmw (348)
6/3/2006 5:18:57 AM
```With an UDF:
=GetEquation("Chart 1", "Y")

Paste the following into a standard module:

'-----------------------------------------
Function getEquation(sChartName As String, sSeriesName As String)
Dim oTrendLine As Trendline
On Error GoTo err_handler
Set oTrendLine = ActiveSheet.ChartObjects(sChartName).Chart _
.SeriesCollection(sSeriesName).Trendlines(1)
getEquation = oTrendLine.DataLabel.Text
Exit Function
err_handler:
getEquation = CVErr(xlErrValue)
End Function
'-------------------------------------------

HTH
--
AP

"Rich 80105" <rich80105@hotmail.com> a �crit dans le message de news:
k73282lj6v27gtegeil0qtebgs34ntb7kc@4ax.com...
>I have a chart with a trendline, with the equation for the trendline
> displayed in the chart.
>
> How can I either format the equation or reference thecomponents of the
> trendline elsewhere in the spreadsheet.
>
> The display says y = 27.894x - 1E+06
> and I would like to be able to at least display the second number
> differently, and preferably be able to reference thetwo numbers
> separately elsewhere in the spreadsheet.
>
> Can this be done (I am using Excel 2000)
>
> Thank you
> Rich 80205

```
 0
ardus.petus (319)
6/3/2006 6:35:18 AM
```On Sat, 3 Jun 2006 15:18:57 +1000, "MartinW" <mtmw@hotmail.invalid>
wrote:

>Hi Rich,
>
>Your equation is in the form  y = mx + c where
>c = Y- Intercept
>
>Use the function SLOPE to return the gradient value and
>Use the function INTERCEPT to return the Y-Intercept value
>
>For example if your x values were in A1 to A7 and your y values
>were in B1 to B7 then your formula for slope would be
>
>=SLOPE(B1:B7,A1:A7)
>
>HTH
>Martin

Thanks, just what I needed
Rich
```
 0
rich80105 (6)
6/3/2006 8:01:56 AM

Similar Artilces:

Finding a line intersect
I have a chart with a number of intersecting lines. Can Excel or a plugin show me the XY values of the intersections? Mike Hi Mike, Maybe this will help. http://www.andypope.info/charts/intersection.htm Cheers Andy Mike Lipphardt wrote: > I have a chart with a number of intersecting lines. Can Excel or a plugin > show me the XY values of the intersections? > > Mike > > -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info ...

What is the issue with working with an Access DB in an on-line/off-line environment
Hi All I use an Access DB for my VB front-end and 95% of my users are laptops/desktops linking to a Domain/Win server/Active Directory setup. I currently have the Access DB and VB app located in the program folder of a PC, but as many users may use the same laptop/desktop as they login to their own specific user account I'm looking to move the access db to the user's My Docs folder (re-directed from the server with off-line access enabled on the laptops and disabled on the desktops) so that each user can run up the program, but actually connect to their data file (access db) v...

Small problem with a line chart
Hi I have a smal problem with a line chart. The chart shows progress of my teams league points over a season, the data is derived from a series of rows which I fill in after a game. In the data, I am using COUNTBLANK to have a blank cell until the row contains data EG =IF(COUNTBLANK(P53:Y53)>0,"",((P53+U53)*3)+Q53+V53) The problem is that the data series assumes unfilled rows (IE the future unplayed games) are zero, so there is a line that connects from the top of my line down to the zero on my X axis. I would just like the line to stop at the last value. Can anyone suggest a w...

linear trend lines
can anyone help? I have to put 95% confidence intervals around a linear trend line. How do I work out the values for the trend line? I am using a scatter graph with 2 sets of data. Please help! --- ~~ Message posted from http://www.ExcelForum.com/ The confidence bound for the estimated line at x is =FORECAST(x,known_y's,known_x's) +/- TINV((1-conf)*2,COUNT(known_y's)-2) *STEYX(known_y's,known_x's) *SQRT(1/COUNT(known_y's)+(x-AVERAGE(known_x's))^2/DEVSQ(known_x's)) the confidence bound for an individual observation at x is =FORECAST(x,known_y's,kn...

write XML with line feeds?
Hello World, any idea how I can convince MSXML.IXMLDOMDocument to save the XML files using CR/LF? I need to manually edit the XML files and it's awkward if everything is in one huge line. -- Arthur Hoornweg (please remove the ".net" from my e-mail address) Looks like you are using the MSXML 3.0 or 4.0 via COM? If you are doing this from a .NET environment, you can automate the indentation by passing the string through an XML Writer. If you just need it for viewing purposes, you could use some XML editor. VS.NET does a decent job. Also XML Spy & Cooktop. -Naraen ...

Grid lines
I can't get my grid lines to work on Excel. Any suggestions? What does >I can't get my grid lines to work on Excel mean? Do ypou mean that they don't print? If so try: File > Page Setup > Sheet and check the Gridlines box in the Print section or you can put borders around the cells Format > Cells > Borders -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings sandymann2@mailinator.com Replace@mailinator.com with @tiscali.co.uk "W. Wells" <otf70@nc.rr.com> wrote in message news:NaLZg.949\$337.517@southea...

How do I create a line graphs with months labelled in the X-axis?
I am trying to create a simple line graph with months labelled in the X axis and the frequency of an event noted in the Y axis? How do I do this? I have turned on the date feature and all of the tick marks are labelled J for January. I suspect you have multiple observations for January. In order to show January only once, you'll need to have just one January observation. "Aisha Khan" <Aisha Khan@discussions.microsoft.com> wrote in message news:BD812177-FE02-443B-88BF-4C9DE87B72DD@microsoft.com... > I am trying to create a simple line graph with months labelled in...

Line Items skipped in PO Generation
We are currently using Dynamics GP v9.0. Our Purchasing Agent has been having a problem now for a couple of months when printing Purchase Orders - As she enters each item, they show correctly on the screen (1, 2, 3, etc), however upon printing the PO, line 2 (or 3) is left blank and then becomes 3 or whatever the next line item would be. The item is not 'skipped' on the PO, just moved down one line item, thus creating a 'blank' line item so that the vendor then thinks there is a line item missing. Any suggestions? This is happening whether there are two items or 20. t...

How to Delete Dark Horizontal line
My husband was revamping a spread sheet at work and somehow added 2 dark horizontal lines (column lines). He highlighted the whole column so it goes on forever. How do you eliminate the line in area where no data has been inputted? Also, how do you change the dark line to a lighter one....as well how did he add a darker horizontal line other than what shows on the border box. Thanks Silly Patty Select the same column Use Format Cells open the Border tab; adjust the borders as needed Get hubby "Excel for Dummies" best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remo...

Using Trend
I have data like this: A B A B A B A B 1 10 2 20 3 30 4 ? The trend formula is =trend (known y, [known x],new x) Generally we select the known y values which are in continuous cells, and then select known x values, after which for a new x value – y-values could be estimated. But is there any way that this could be done by selecting y and x – values which are in non-contiguous cells( like values if present in alternative cells) Thanks Answered under separate threads in charting and programming newsgroups. Jerry vijaya wrote: > I have data like th...

Hi there, I have been using excel for year to make simple spreadsheets but now I have been tasked with creating a sort of task time line bu have no idea how! I want the dates down the side (How would you exclude weekends??) Then I want a button where the user can "add a task" the user wil enter a task name, start date and effort, ie length of time required t complete. Excel will then automatically "block" fill the releivent time period. But to make things even more complicated, if the user adds a task tha has a start date the starts in the middle of another task (Say the ...

Insert a line and maintain formatting
Hi I have Excel 2002, how do I insert a line and maintain the formatting sequence of the cells above and below where I have inserted the line. thanks Daniel Hi Daniel Insert the row needed and then choose the row above click on the format painter and then click on the row you just inserted. All cells in the row will pick up the formatting of the row above. Cheers Rob "Daniel" <none@none> wrote in message news:OBN02vk9FHA.4004@TK2MSFTNGP14.phx.gbl... > > Hi > > I have Excel 2002, how do I insert a line and maintain the formatting > sequence of t...

Trends / Trended items
I've got Version 11 - it doesn't say the year and I can't remember (2003 perhaps?). I find the forecast cash flow feature very useful but also very inaccurate as some items seem to get picked up as likely recurring expenditure or income, and some do not. Is there a better way of controlling this, and has it been improved in later versions? You have a couple of choices here with the forecast cash flow. You can use 'trended' items, which Money calculates based on previous spending. You could use budgeted items instead or turn both off. With 2003, you may be able ...

line graphs
how do I graph column B vs column A EXCEL 2007 Please go to:- http://www.pierrefondes.com/ There are 6 examples of Line Charts. Item numbers:- 69 / 55 / 53 / 49 / 48 and 44. You can take your choice as to which is best for you (they are all similar though). If my comments have helped please hit Yes. Thanks. "khw" wrote: > how do I graph column B vs column A ...

Trend line through the origin
I have three points (sometimes four) on a scatter graph. I need the formula for the best fit straight line through them that also goes exactly through the origin (0,0). an example of data would be: Test 1 X = 202.64, Y = 226.59 Test 2 X = 301.34, Y = 335.99 Test 3 X = 400.03, Y = 450.45 Alan See help for LINEST, or use =SUMPRODUCT(ydata,xdata)/SUMSQ(xdata) Jerry Alan Cocks wrote: > I have three points (sometimes four) on a scatter graph. > I need the formula for the best fit straight line through them that also > goes exactly through the origin (0,0). > >...

How do I add a reference line to Excel charts?
I want to add a simple horizontal line across a chart that represents the average of the lines of plotted data, in my case monthly grocery expenditures. The data is graphed in a simple bar format, and I'd just like an average line that stands out. see tushar methta's page http://www.tushar-mehta.com/excel/charts/straight_lines/index.html roswellmike <roswellmike@discussions.microsoft.com> wrote in message news:45F0F11B-8D2B-4401-A16D-6A9BD27458E2@microsoft.com... > I want to add a simple horizontal line across a chart that represents the > average of the lines of ...

Why when I print out a spreadsheet on Excel it doesn't have lines
Please tell me how to get lines(rows and columns) on my paper when I print out my spreadsheet using excel? Go to the File menu and choose Page Setup. There, select the Sheet tab and put a check mark in the Gridlines checkbox. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "johnson001" <johnson001@discussions.microsoft.com> wrote in message news:FB9FAA5D-7856-4680-8F08-BB0D999F5C05@microsoft.com... > Please tell me how to get lines(rows and columns) on my paper > when I print > out my spreadsheet using excel...

dividing lines
I have made a continueous form in Access and when I switch to the print preview, I can see the dividing lines on the screen. However when I print the form, the dividing lines do not appear on the paper. I use Office 2007 with SP2. When I perform the same actions on a machine with Office 2007 SP1, the dividing lines are shown on the print preview as well as on the printout. Can anyone help me with this issue. -- bosje On Thu, 4 Mar 2010 04:21:01 -0800, bosje <email@voorbeeld.com> wrote: I'm not sure how to answer your question, other than to say that forms are rea...

alternate lines
Hello I would like to apply conditional formatting so that every 2 lines has shading on the next 2 lines. Example 1 yellow 2 yellow 3 white 4 white 5 yellow 6 yellow and so on hope that makes sense Thank you Jenny Hi Select the whole range of cells you wish to shade. Format>>Conditional Formatting>Formula Is> =OR(MOD(ROW(),4)=0,MOD(ROW),4)=3) Format>Fill colour>Yellow -- Regards Roger Govier "JB" <somehow@somewhere> wrote in message news:ufKEtJUAJHA.1180@TK2MSFTNGP04.phx.gbl... > Hello > I would like to apply conditional formatting so that every...

Auto enter subject line in outlook?
Hi all, is it possible to have the subject bar filled in automatically from words in the message body itself? message in brackets[] [Eg. Subject:Appointment at 1215 on 5 may 2010 message: Dear sir, you have an apointment at 1215 on 5th may 2010 , thanks.] is it possible to have the date and time automatically filled in/replaced when i type the actual date and time in the message body? Thanks. Submitted using http://www.outlookforums.com As there's no event for that, it could work with a timer: Check at intervals the content of the Body property. And if you dete...

trend
Is there any way in which I could arrive at a trend on reducing percentage Starting with 13% for 2000 & Dropping to 8% for 10000 So basically, when I put any value between 2000 & 10000; say, 7569 in c1, I get the corresponding % in c2 -- Dr. Sachin Wagh MBBS, DHA, DPH One way .. Assume the known data below is in A1:B2 2000 13% 10000 8% and C1 contains 7569 Put in say, C2: =FORECAST(C1,\$B\$1:\$B\$2,\$A\$1:\$A\$2) C2 will return 9.52% -- Rgds Max xl 97 --- GMT+8, 1� 22' N 103� 45' E xdemechanik <at>yahoo<dot>com ---- "Dr. Sachin Wagh" <DrSachinWagh@di...

Adding lines together to create one line
This is probably very simple but somehow I can't remember how to concatenate lines, so I have one line. Here is example: Table: Notes OrderNo LineNo Note 111 1 aaa 111 2 bbb 111 3 ccc 222 1 xxx 222 2 yyy 333 1 000 333 2 111 333 3 222 333 4 333 The result should be: Table: A OrderNo Note 111 aaabbbccc 222 xxxyyy 333 000111222333 I've tried with this query...

Dedicated DSL line for remote access
We have a DSL line for our SBS 2008 that runs about 720k up and 3M down. With multiple remote users, the access is quite slow. Is it possible to get a second DSL line and dedicate it solely to remote access? On 01/07/2010 15:56, Dave the Clueless wrote: > We have a DSL line for our SBS 2008 that runs about 720k up and 3M > down. With multiple remote users, the access is quite slow. Is it > possible to get a second DSL line and dedicate it solely to remote > access? You'd need a dual-WAN router at the edge to handle both incoming lines. Then you'd have to route...

Sales Transaction Entry
After editing a sales line item detail and saving, the Sales Transaction Entry window should default to the selected line item; currently it refreshes to the first line item which can be frustrating if you have several line items and you have to scroll down to the next item to be edited. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based...

Line feeds in Outlook 2003
My emails are all composed in html format. If I copy from either a Word document or a recieved email and then paste into a new email the line feeds are double instead of single. This happens even if the original was single line feed. How do I stop this? Steve When you paste from word you are pasting word's formatting which is converted to its html code. use paste special, as text or paste into notepad then copy from notepad and paste. if you do this often get puretext - it's a windows application that automates removing the formatting from text on the clipboard. -- Diane Po...