+ Reply to Thread
Results 1 to 5 of 5

Excel 2008 : How to Count and/or Sum consecutive values on a range with blank data in the middle

  1. #1
    Registered User
    Join Date
    01-15-2012
    Location
    Argentina
    MS-Off Ver
    Excel 2003
    Posts
    4

    How to Count and/or Sum consecutive values on a range with blank data in the middle

    Hi....my first post here....will try to make it simple.

    I have a trading system spreadsheet where I want to calculate Consecutive Day Wins / Loss, as well as the money won or loss by those consecutive days.

    IF I would have valid data (call it a WIN or LOSS) EVERY day, I know how to do this in some way (maybe not the ideal way). BUT the problem I face is there are many days that there is no trade (no value win/loss), so the concept of consecutive is not really consecutive days, but consecutive days WITH TRADES. Not sure how to do this.

    The real output I need is the MAX number of consecutive wins (and the $ it represents) as well as for losses.

    I attached the example on the file to visualize it better.

    Thanks a lot.
    Attached Files Attached Files

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to Count and/or Sum consecutive values on a range with blank data in the midd

    Maybe this way?
    Use a helper column, say Column E, this can be hidden (use the grouping icon/button)
    In E1 enter 1
    In E2
    Please Login or Register  to view this content.
    In F2
    Please Login or Register  to view this content.
    Drag/Fill both Down to the last row of your table.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Registered User
    Join Date
    01-15-2012
    Location
    Argentina
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: How to Count and/or Sum consecutive values on a range with blank data in the midd

    Quote Originally Posted by Marcol View Post
    Maybe this way?
    Use a helper column, say Column E, this can be hidden (use the grouping icon/button)
    In E1 enter 1
    In E2
    Please Login or Register  to view this content.
    In F2
    Please Login or Register  to view this content.
    Drag/Fill both Down to the last row of your table.
    Thanks for your time.

    For the $ part it's ok, still I need to have the numbers of consecutive days of W / L, so where we have the 13 on your formula, it should say 6 (as there were six consec TRADING days without Losses).

    Yest night I found some type of solution to this, but as always is A WAY I managed to do it with many helper cols, but would love to know if some more complex formulas I do not know can optimize this as I like learning new tips.



    Attached is the solution I got.
    Attached Files Attached Files

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to Count and/or Sum consecutive values on a range with blank data in the midd

    Add this
    In G2
    Please Login or Register  to view this content.
    In H2
    Please Login or Register  to view this content.
    Drag/Fill both down.

    See the C/F for the cell colour rules.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-15-2012
    Location
    Argentina
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: How to Count and/or Sum consecutive values on a range with blank data in the midd

    Quote Originally Posted by Marcol View Post
    Add this
    In G2
    Please Login or Register  to view this content.
    In H2
    Please Login or Register  to view this content.
    Drag/Fill both down.

    See the C/F for the cell colour rules.
    Thansk a lot.....will study all the index funtion u use there....

+ 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