Seeking advice on where to begin - Searching for team form football data

widgewilliams

New Member
Joined
Apr 11, 2017
Messages
16
Hi guys and gals.

At this stage Im not looking for a specific solution to a problem but rather ideas on how to approach something.

I have several spreadsheets of football data covering several seasons of results and odds.

eg:

DateHomeTeamAwayTeamHome GoalsAway GoalsResultHome OddsDraw OddsAway OddsHA
18/08/12ArsenalSunderland00D1.444.899.5DD
18/08/12FulhamNorwich50H1.853.824.8WL
18/08/12NewcastleTottenham21H2.73.472.85WL
18/08/12QPRSwansea05A2.13.554.2LW
18/08/12ReadingStoke11D2.453.43.26DD
18/08/12West BromLiverpool30H4.383.612WL
18/08/12West HamAston Villa10H2.33.463.51WL
19/08/12Man CitySouthampton32H1.217.5519.38WL
19/08/12WiganChelsea02A6.7541.67LW
20/08/12EvertonMan United10H4.453.711.91WL
22/08/12ChelseaReading42H1.296.214WL
25/08/12Aston VillaEverton13A3.253.42.6LW
25/08/12ChelseaNewcastle20H1.534.557WL
25/08/12Man UnitedFulham32H1.335.5212WL
25/08/12NorwichQPR11D2.383.523.25DD
25/08/12SouthamptonWigan02A2.23.533.65LW
25/08/12SwanseaWest Ham30H2.153.473.85WL
25/08/12TottenhamWest Brom11D1.544.537.5DD
26/08/12LiverpoolMan City22D3.153.452.48DD

<tbody>
</tbody>



Data extends up to 3000 rows for some leagues.

Somehow, I would like to do two similar things.

The first is to identify only those games where the home team has WON 4 out of their 5 PREVIOUS home games, AND where the away team has LOST 4 out of PREVIOUS last 5 away games.

Specifically any game where the home teams previous form is WWWWD, WWWDW, WWDWW, WDWWW, DWWWW. The away team form combination is abit more complex with 112 possibilities but basically no more than 1 win in their last 5 games

While the second is to identify only those games where there have been 2 or more goals in 4 of the home teams last 5 games, AND 2 or more goals in 4 of the away teams last 5 away games.

Is this something that is even possible in Excel?

If it is, I'd really appreciate some general advice on how you would go about approaching the task?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi there. I haven't provided a full solution, as you only wanted some guidance, but I have cobbled together a couple of columns that can go towards what you want. I assume your data starts in A1 - for the formulas to work there needs to be an extra blank row at the top, so I have shown data starting in row3. The formula in L3, copied down, give the last 5 results (in reverse order) for the home team - the formula in M3 copied down gives the number of wins in that set. I notice you didn't include examples such as"WWWWL" - if you only want to cater for win/draw scenraios then you will need to modify that formula. A modification of those formulas in N and O gives the away team form, and column P gives a match if both criteria are satisfied. It would be possible to condense the formulae into a single cell, but it would be very complex, so I thought it better to set it out in columns.

Excel 2007 32 bit
ABCDEFGHIJKLMNOP
1
2DateHomeTeamAwayTeamHome GoalsAway GoalsResultHome OddsDraw OddsAway OddsHAHome patternAway Pattern
318/08/2012ArsenalSunderland00D1.444.899.5DDD0D0
418/08/2012ChelseaSwansea50H1.853.824.8WLW1L1
518/08/2012ChelseaSwansea21H2.73.472.85WLWW2LL2
618/08/2012QPRSwansea05A2.13.554.2LWL0WLL2
718/08/2012ChelseaStoke11D2.453.43.26DDDWW2D0
818/08/2012West BromSwansea30H4.383.612WLW1LWLL3
918/08/2012ChelseaAston Villa10H2.33.463.51WLWDWW3L1
1019/08/2012Man CitySouthampton32H1.217.5519.38WLW1L1
1119/08/2012WiganChelsea02A6.7541.67LWL0W0
1220/08/2012EvertonMan United10H4.453.711.91WLW1L1
1322/08/2012ChelseaSwansea42H1.296.214WLWWDWW4LLWLL4Match
1425/08/2012ChelseaLiverpool13A3.253.42.6LWLWWDW3W0

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
L3=IF([COLOR=rgb(255]ISNA(LOOKUP([COLOR=0)]2,1/([COLOR=rgb(0]B$1:B2=B3[/COLOR]),L$1:L2[/COLOR])),J3,MID(J3&LOOKUP([COLOR=0)]2,1/([COLOR=rgb(0]B$1:B2=B3[/COLOR]),L$1:L2[/COLOR]),1,5)[/COLOR])
M3=LEN([COLOR=rgb(255]L3[/COLOR])-LEN([COLOR=rgb(255]SUBSTITUTE(L3,"W","")[/COLOR])
N3=IF([COLOR=rgb(255]ISNA(LOOKUP([COLOR=0)]2,1/([COLOR=rgb(0]C$1:C2=C3[/COLOR]),N$1:N2[/COLOR])),K3,MID(K3&LOOKUP([COLOR=0)]2,1/([COLOR=rgb(0]C$1:C2=C3[/COLOR]),N$1:N2[/COLOR]),1,5)[/COLOR])
O3=LEN([COLOR=rgb(255]N3[/COLOR])-LEN([COLOR=rgb(255]SUBSTITUTE(N3,"L","")[/COLOR])
P3=IF([COLOR=rgb(255]AND(M3=4,O3=4),"Match",""[/COLOR])

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

 
Last edited:
Upvote 0
It looks like those formulas adidntcome out right so here they are:
L3 =IF(ISNA(LOOKUP(2,1/(B$1:B2=B3),L$1:L2)),J3,MID(J3&LOOKUP(2,1/(B$1:B2=B3),L$1:L2),1,5))
M3 =LEN(L3)-LEN(SUBSTITUTE(L3,"W",""))
N3 =IF(ISNA(LOOKUP(2,1/(C$1:C2=C3),N$1:N2)),K3,MID(K3&LOOKUP(2,1/(C$1:C2=C3),N$1:N2),1,5))
O3 =LEN(N3)-LEN(SUBSTITUTE(N3,"L",""))
P3 =IF(AND(M3=4,O3=4),"Match","")
 
Upvote 0

Forum statistics

Threads
1,215,601
Messages
6,125,763
Members
449,259
Latest member
rehanahmadawan

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