+ Reply to Thread
Results 1 to 10 of 10

Creating Linear Trendlines for Certain x ranges in a Graph

  1. #1
    Registered User
    Join Date
    08-27-2010
    Location
    FL
    MS-Off Ver
    Excel 2007
    Posts
    4

    Creating Linear Trendlines for Certain x ranges in a Graph

    Hi,

    I'm new to both this forum and Excel 2007 (for Windows). What I'm trying to do is add a trendline to specific parts of a graph, but not to the graph as a whole. I have the graph on a separate sheet labeled Chart 1. It is a scattergram of concentration (ppm) as a function of time (from 0:00:00 to 1:21:15 in increments of 5 seconds). I want to add a trendline from 0:00:00 to 0:09:52, from 0:09:52 to 31:00, from 31:00 to 1:01:01, and from 1:01:01 to 1:05:57. How should I go about doing this? Sorry, I'm a beginner.

    Extra (Helpful) Info:
    On the Chart1 sheet, on the functions tab it says:

    =SERIES(Sheet1!$C$10,Sheet1!$B$11:$B$986,Sheet1!$C$11:$C$986,1)

    Starting from A11 (label is at A10) to A986, is the time in H:M:S. B11 (label at B10) to B986 is the time passed starting from 0:00:00. C11 (label at C10) to C986 is the concentration.

    Sometimes, I get the message near the ribbon that says: Security Warning: Data connections have been disabled.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Creating Linear Trendlines for Certain x ranges in a Graph

    Welcome to the forum.

    Ctreate a separate series for each segment you want a trendline for.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    08-27-2010
    Location
    FL
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Creating Linear Trendlines for Certain x ranges in a Graph

    ^ Thanks. That's what I want to do, but I don't know how to go about doing that.

    I also want to create all these trendlines on one graph. I don't want to create 4 different graphs for 4 segments.
    Last edited by anonymous59; 08-28-2010 at 12:27 PM.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Creating Linear Trendlines for Certain x ranges in a Graph

    You don't need four graphs, you need four series on one graph.

    Separate the data into four groups, one for each series. Create a new chart for the first series, and then add the three other series to the same graph.

  5. #5
    Registered User
    Join Date
    08-27-2010
    Location
    FL
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Creating Linear Trendlines for Certain x ranges in a Graph

    But how do you add the three other graphs to the first graph? I keep getting four graphs with four copies of Series 1. When I try moving the three other graphs to the sheet with the first graph, it just embeds it.

    Sorry as I said, I'm very new to this. But Excel still beats MATLAB when it comes to simple graphing.
    Last edited by anonymous59; 08-28-2010 at 01:12 PM.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Creating Linear Trendlines for Certain x ranges in a Graph

    But how do you add the three other graphs to the first graph?
    Not adding graphs to graphs, adding series to graphs.

    See http://www.youtube.com/watch?v=m6OazqcAbpo. You're probably using x-y charts, but the principle is the same.

    If that doesn't help (but please try it first) post a workbook and explain in context.

  7. #7
    Registered User
    Join Date
    08-27-2010
    Location
    FL
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Creating Linear Trendlines for Certain x ranges in a Graph

    ^ Thanks. It worked perfectly!

    I added to your rep.

  8. #8
    Registered User
    Join Date
    07-25-2012
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Creating Linear Trendlines for Certain x ranges in a Graph

    Hi, I am using Excel 2010 (Windows) and trying to do something similar. I have three data series, one "total" and then two sub-sets. The time period (Axis labels) runs from July to May. The two sub-sets only have data from January to May. However, in order to have them appear on the graph in their correct spot I have to have series data run from July to May, including the blank cells, otherwise the Jan-May data points show up intermingled with the July-November data points (Excel wants every data series to start on the far left, period). That's OK and is not the issue. The issue is that when I create a trendline for the sub-set data the trendline runs all the way from the far left to the far right of the graph. My customer would prefer those trendlines only appear from January-May. Is there some way that I can tell the trendline, "Start here, not there?"

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Creating Linear Trendlines for Certain x ranges in a Graph

    Hello deanslgr, and welcome to the forum.

    Unfortunately you have inadvertently broken one of the forum rules. Please read the following and make the necessary change. Thanks.

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.

  10. #10
    Registered User
    Join Date
    07-25-2012
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Creating Linear Trendlines for Certain x ranges in a Graph

    I'm glad that makes sense to you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1