+ Reply to Thread
Results 1 to 3 of 3

Finding a streek

  1. #1
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Finding a streek

    Hi,

    I'm trying to find out how to return the date or time of a streak occurring in a coin toss.
    The streak I'm trying to identify is when a Heads follows a Tails (T following H) more than 4 times in a row:

    For example: t t t t h t h t h t h t h t t h h h t h t h

    Where the streak is bold.

    I have an example sheet attached with the date in column A and the coin flip in B and a 1 & 0 column in C (I was trying to use the 1's and 0's b/c I thought they'd be easier to work with than strings.

    Also, there might be some days that no coin is tossed, these days should be skipped.
    I'd like to find out when the date of a streak occurs.

    Can anyone help with this?

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Finding a streek

    this should work
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Re: Finding a streek

    Thanks Martin,

    Your series of functions are returning my desired results. I'm still trying to get a grasp on how they actually work and the links you've provided are proving very useful, especially 'why use -- in sumproduct.' I was going about this problem a completely different way, by trying to use a Macro, but my VBA skills are limited (although growing).

    Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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