+ Reply to Thread
Results 1 to 3 of 3

How to automatically display a sawtooth line chart?

  1. #1
    Registered User
    Join Date
    08-29-2012
    Location
    Birmingham
    MS-Off Ver
    Excel 2007
    Posts
    2

    How to automatically display a sawtooth line chart?

    Hello all,

    My first post here so go gentle!
    I've searched for this issue using the keyword "sawtooth" but only found a 2005 answer which is already how I'm working around it, so I'm hoping a better way has been developed since then!

    I have this data:

    16/11/2011 750
    23/11/2011 753
    30/11/2011 94
    01/12/2011 91
    05/12/2011 49
    01/02/2012 469
    03/02/2012 489
    14/02/2012 492
    22/02/2012 514
    24/02/2012 378

    Which I'd like to display as a sawtooth graph. I cannot find any option to do so in the multiple chart types available in Excel 2007. Instead I have had to manually add in duplicate dates with the previous values like this:

    16/11/2011 750
    23/11/2011 750
    23/11/2011 753
    30/11/2011 753
    30/11/2011 94
    01/12/2011 94
    01/12/2011 91
    05/12/2011 91
    05/12/2011 49
    01/02/2012 49
    01/02/2012 469
    03/02/2012 469
    03/02/2012 489
    14/02/2012 489
    14/02/2012 492
    22/02/2012 492
    22/02/2012 514
    24/02/2012 514

    Is there an automatic way of doing this? Or would I have to resort to vba?

    Many thanks in advance,

    Scott

  2. #2
    Forum Contributor
    Join Date
    02-22-2011
    Location
    Rhône Alpes, France
    MS-Off Ver
    Excel 2007
    Posts
    201

    Re: How to automatically display a sawtooth line chart?

    Hi,
    To duplicate rows I use a macro from jbeaucaire with minor change: see url
    To insert the sawtooth chart I use Step Chart in Microsoft Excel from Jon Peltier: see url
    The procedure apply is the XY Chart with Error Bars
    I have not been able to properly format dates abscissa corresponding to each sawtooth
    Hope this help
    Best regards
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-29-2012
    Location
    Birmingham
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: How to automatically display a sawtooth line chart?

    Thank you for the response. I found the macro very useful.

    The graph generation on the other hand seems a little long-winded.

    I feel it can be made easier by simply shifting the column with the y values down one row, then deleting the first row (you don't need a duplicate for the first date).
    This does leave you with a missing final date, but I will be putting TODAY() in that box. It should be easy enough to add in whichever final date you want.
    Then just generate a simple line graph with the 2 columns and it will display as a sawtooth.

    This method leaves you without the hassle of extra columns and naming.

    Thanks again.

+ 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