Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Counting current winning streak

Hi,

I'm looking for a way to count the current consecutive wins for a team in a
two team competition.

I've tried using 'countif', but that doesn't quite seem to work for me. It
seems like it should be a relatively simple thing to do, but I just can't get
it.

My current spreadsheet has the 'winner' of an event listed in column D. It
will only ever be one of two teams (Team 1 or Team 2). How can I set up a
formula in a cell to count the current winning streak of a team.

Ideally, it would reset once a streak is broken (and a new one starts).

Hope all that makes sense.

Thanks,
Scott
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Counting current winning streak

Here is one way to do it...

=ABS(SUMPRODUCT(MAX(ROW(D$2:D$65535)*(D$2:D$65535= "Team1")))-SUMPRODUCT(MAX(ROW(D$2:D$65535)*(D$2:D$65535="Team 2"))))

Just substitute the actual names of Team1 and Team2 where I show them as
place holders. Also note that I assume the first row is a header row. if
that is not the case, then change all D$2 references to D$# where # is the
row number where your data starts at. You can also make this formula a
little more efficient by changing all the D$65535 references to D$### where
### is the row number of the highest row you ever expect data to be filled
in to.

Rick


"Scopar" wrote in message
...
Hi,

I'm looking for a way to count the current consecutive wins for a team in
a
two team competition.

I've tried using 'countif', but that doesn't quite seem to work for me.
It
seems like it should be a relatively simple thing to do, but I just can't
get
it.

My current spreadsheet has the 'winner' of an event listed in column D.
It
will only ever be one of two teams (Team 1 or Team 2). How can I set up a
formula in a cell to count the current winning streak of a team.

Ideally, it would reset once a streak is broken (and a new one starts).

Hope all that makes sense.

Thanks,
Scott


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Counting current winning streak

*Maybe* something like this:

D2: T1
D3: T1
D4: T2
D5: T1
D6: T1
D7: T1
D8: T1
D9: T2
D10: T2

Enter this formula in E2:

=IF(D3=D2,"",1)

Enter this formula in E3 and copy down to E10:

=IF(D4=D3,"",COUNTIF(D$2:D3,D3)-SUMIF(D$2:D2,D3,E$2:E2))

This will be the result:

..............D.....E....
1.........................
2..........T1..........
3..........T1....2...
4..........T2....1...
5..........T1........
6..........T1........
7..........T1........
8..........T1....4...
9..........T2.........
10........T2....2...


--
Biff
Microsoft Excel MVP


"Scopar" wrote in message
...
Hi,

I'm looking for a way to count the current consecutive wins for a team in
a
two team competition.

I've tried using 'countif', but that doesn't quite seem to work for me.
It
seems like it should be a relatively simple thing to do, but I just can't
get
it.

My current spreadsheet has the 'winner' of an event listed in column D.
It
will only ever be one of two teams (Team 1 or Team 2). How can I set up a
formula in a cell to count the current winning streak of a team.

Ideally, it would reset once a streak is broken (and a new one starts).

Hope all that makes sense.

Thanks,
Scott



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I calculate probability of winning a raffle RichM Excel Worksheet Functions 2 September 15th 06 02:19 AM
Raffle winning odds (off topic) Walter Mayes Excel Worksheet Functions 4 July 27th 06 05:26 PM
Bingo Lottery Winning Numbers Nomis-MCSE Excel Discussion (Misc queries) 1 January 13th 06 07:21 PM
longet Win streak ParTeeGolfer Excel Worksheet Functions 6 January 9th 05 12:12 PM
Winning Streak ParTeeGolfer Excel Worksheet Functions 4 December 31st 04 11:08 PM


All times are GMT +1. The time now is 07:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"