+ Reply to Thread
Results 1 to 5 of 5

Trendline for months but not YTD

  1. #1
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Trendline for months but not YTD

    Hi,
    I haven't spent a great deal of time on charts.
    I have a range of figures for months and also a Year to date average figure.
    my question is can I have all these data on the same chart, but add a trend line only for the months.
    I have attached a sample workbook with a trend line, but which it to stop at the last month and not include the YTD figure.

    Is this possible?
    Attached Files Attached Files
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,972

    Re: Trendline for months but not YTD

    Given that we're in June and your data only goes up to May, at which point do you want the trend line to stop?

    BSB

  3. #3
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Trendline for months but not YTD

    May,

    This is only a sample of data, and will have to update it using formula etc to get ranges or via VBA.
    But for now just trying to find out if this is possible? and if so how?

    cheers

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,484

    Re: Trendline for months but not YTD

    I don't use the chart trendlines much (preferring to perform regressions directly in the spreadsheet). From what I know of them, they cannot be configured to "ignore" data points that are part of the series they are based on. This means, to get a chart trendline to ignore a data point, you have to remove the data point from the data series. When I do it, that means having two data series in the chart (and two rows of data in the spreadsheet). One row would have your monthly data just like it, then another row that will be for the YTD series.

    Please Login or Register  to view this content.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Trendline for months but not YTD

    You lost me on the code tags part.
    But I think I got it.

    2 series of data
    All = Jan to YTD
    Months = Jan to May

    then set trend line for Months data
    then set shape fill for Months data as no fill to hide the bars for that data.

    Seems to work but this maybe complicated for my project

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Excel 2010 Trendline With Data labels or number on forward forecast trendline
    By camelight in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 10-15-2015, 08:35 AM
  2. Replies: 2
    Last Post: 07-22-2014, 02:15 AM
  3. Replies: 8
    Last Post: 02-20-2014, 05:46 PM
  4. Replies: 0
    Last Post: 04-13-2012, 03:10 AM
  5. Replies: 0
    Last Post: 10-11-2011, 03:22 PM

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