+ Reply to Thread
Results 1 to 4 of 4

Cumulative Line Graph

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    16

    Cumulative Line Graph

    I am trying to create a line graph that charts the ups and downs of a weekly set of results.

    I have attached a set of dummy results, but imagine the weeks could co up to 52.

    So what I want on sheet 1 is a line graph that shows a cumulative running total. But I want it to split the data up by weeks and only when column D on sheet 2 equals EPL.

    Example

    Week 1(sheet 2) has 11 EPL results with a total value of 45.99. Week 2 has 18 EPL results with a total value of -14.29

    So week 1 would be on the bottom axis and would have a value of £45.99 and then week 2 would be the next point and this value would be £31.70 (45.99 – 31.70) and it would continue like this week after week.

    Is this possible to do?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Cumulative Line Graph

    You should create a separate table to hold you cumulative values, then use that for your graph.

    Here is what I did:
    First, I needed to 'fix' your Sheet2 table since row 352 was missing a week. I assumed it was 24 in cell A352.
    In sheet 1, starting in cell A38 I put in the week I wanted to track, so I input a 1. Then, the rows below that increment up to 52 (so, A39 had a 2, A40 had a 3, etc.)
    In sheet 1, at cell B38 I used this formula:
    =SUMPRODUCT('sheet 2'!$F$4:$F$352,--('sheet 2'!$A$4:$A$352<='sheet 1'!A38),--('sheet 2'!$D$4:$D$352="EPL"))

    I then dragged that formula down column B to my last week.

    Note: I calculated 45.99 for Week 1, but 36.70 for Week 2. I see Week 2 has 19 EPL results, not 18.

    Note, if you have a later version of Excel, you would use SUMIFS
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: Cumulative Line Graph

    Not sure if this is what you envisaged, but it's my take on your original post.

    Let me know if you have any questions or would like more help with it.

    I agree with Pauley though in the sense that the figures you quote in your post are not exactly what the data gives.
    Attached Files Attached Files
    If I've been of help, please hit the star

  4. #4
    Registered User
    Join Date
    10-29-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Cumulative Line Graph

    thanks Pauleyb, that was the best option and works perfectly.

+ 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