3 wins in a row

methody

Well-known Member
Joined
Jun 17, 2002
Messages
857
Hello there

I have a list of sports fixtures eg Man Utd v Arsenal, Chelsea v spurs etc one below the other. I enter the scores eg Man Utd 0 v 1 Arsenal.

I am looking for a formula this will indicate when a team has won 4 matches in a row. So that as I enter all the results once the 4th consecutive wins for a particular team occurs an X appears to the right of that team indicating a run of 4.

The difficult is that team names may appear on the left and the right.

I would also want a new chain or run to start after the first 4 so that if there were 5 consecutive wins and X would not appear beside the 5th win.

A starting point might be to have a basic If formula to the left or right of each fixture indicating W or L but that's as far far as I can go.

thanks
 
This is the method I used (after a bit of a clean-up)

<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Calibri,Arial; FONT-SIZE: 11pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 82px"><COL style="WIDTH: 82px"><COL style="WIDTH: 44px"><COL style="WIDTH: 41px"><COL style="WIDTH: 82px"><COL style="WIDTH: 82px"><COL style="WIDTH: 97px"><COL style="WIDTH: 56px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold"><TD> </TD><TD>B</TD><TD>C</TD><TD>D</TD><TD>E</TD><TD>F</TD><TD>G</TD><TD>H</TD><TD>I</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">1</TD><TD>HomeTeam</TD><TD>AwayTeam</TD><TD>Home</TD><TD>Away</TD><TD>Winner</TD><TD>Loser</TD><TD>Loss counter</TD><TD>3 Streak</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">2</TD><TD>Aston Villa</TD><TD>West Ham</TD><TD style="TEXT-ALIGN: right">3</TD><TD style="TEXT-ALIGN: right">0</TD><TD>Aston Villa</TD><TD>West Ham</TD><TD>West Ham1</TD><TD> </TD></TR></TBODY></TABLE>
<TABLE style="BORDER-BOTTOM-STYLE: groove; BORDER-BOTTOM-COLOR: #00ff00; BORDER-RIGHT-STYLE: groove; BACKGROUND-COLOR: #fffcf9; BORDER-TOP-COLOR: #00ff00; FONT-FAMILY: Arial; BORDER-TOP-STYLE: groove; COLOR: #000000; BORDER-RIGHT-COLOR: #00ff00; FONT-SIZE: 10pt; BORDER-LEFT-STYLE: groove; BORDER-LEFT-COLOR: #00ff00"><TBODY><TR><TD>Spreadsheet Formulas</TD></TR><TR><TD><TABLE style="FONT-FAMILY: Arial; FONT-SIZE: 9pt" border=1 cellSpacing=0 cellPadding=2><TBODY><TR style="BACKGROUND-COLOR: #cacaca; FONT-SIZE: 10pt"><TD>Cell</TD><TD>Formula</TD></TR><TR><TD>F2</TD><TD>=IF(D2>E2,B2,C2)</TD></TR><TR><TD>G2</TD><TD>=IF(D2<E2,B2,C2)</TD></TR><TR><TD>H2</TD><TD>=G2&COUNTIF(G$2:G2,G2)</TD></TR><TR><TD>I2</TD><TD>=IF(MOD(COUNTIF(INDEX(F$2:F$246,IF(COUNTIF(G$2:G2,F2),MATCH(F2&COUNTIF(G$2:G2,F2),H$2:H2,0),1)):F2,F2),3),"","X")</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>

Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1

In the last formula

=IF(MOD(COUNTIF(INDEX(F$2:F$246,IF(COUNTIF(G$2:G2,F2),MATCH(F2&COUNTIF(G$2:G2,F2),H$2:H2,0),1)):F2,F2),3),"","X")

246 was the row with the last result on the table used.
3 is the win streak to be flagged with "X"

Hope this helps.

Aladin, can you improve this?
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Something I didn't notice has just been pointed out to me, the formula in G2 didn't display correctly, it should be

PHP:
=IF(D2<E2,B2,C2)
 
Upvote 0

Forum statistics

Threads
1,224,525
Messages
6,179,317
Members
452,905
Latest member
deadwings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top