Ranking formula

bluegold

Active Member
Joined
Jun 21, 2009
Messages
279
Ok so I've got a spreadsheet of league matches and I need a formula to determine whether the Home Team (ColA) is up or down the ladder in comparison to their Away team opponent (ColB) according to the data in columns AQ, AR, AS & AT.
ColAQ - Home team competition points
ColAR - Home team points scored - points conceded = points difference (To be used as a tiebreaker when both Home & Away teams are on equal competition points)
ColAS & AT are the same as above but relating to the Away team.
ColE - The table formula which I have filled out with the desired results.
Now you will see in columns AQ - AT that the spreadsheet begins with cell entries "nd" for the first 9 rows. This is because their is no previous data available The next lot of "nd" cell entries beginning on row 26 is when a new season has begun. The table formula must look for the last available data before it returns a "nd", in this instance it had previous data to still determine table position relative to the away team.

If two team's are on equal competitions points and equal points difference then the home team should be up by default.

If there are any questions don't hesitate to ask :)

Notes:
Using Excel 2007
nd = Acronym for "No Data" (Custom cell format)

ABEAQARASAT
1HomeAwayTable PositionHome Team PointsHome F&A DifferenceAway Team PointsAway F&A Difference
2southssydneyndndndndnd
3gcoastnqldndndndndnd
4newcastlecanberrandndndndnd
5parramattacanterburyndndndndnd
6manlycronullandndndndnd
7westssgeorgendndndndnd
8brisbanepenrithndndndndnd
9melbournenzealandndndndndnd
10southscanterburydown0-140-8
11sydneybrisbanedown214236
12newcastlemanlyup2160-6
13penrithcanberradown0-360-16
14nqldwestsdown0-1828
15nzealandparramattadown0-1428
16melbournecronullaup21426
17sgeorgegcoastdown0-8218
18brisbanenqldup4420-38
19parramattanewcastledown2-6417
20sydneymelbournedown28213
21canberrasgeorgedown2-12210
22gcoastcronulladown2047
23canterburywestsdown25428
24penrithsouthsdown0-400-27
25manlynzealanddown0-720
26canterburysydneyupndndndnd
27melbournebrisbanedownndndndnd
28nqldparramattadownndndndnd
29sgeorgecronulladownndndndnd
30gcoastcanberraupndndndnd
31nzealandnewcastledownndndndnd
32manlysouthsupndndndnd
33westspenrithupndndndnd

<tbody>
</tbody>
 
It's not clear to me what you are after exactly, and I'm guessing no one else either. Let's take one step a time. Column AQ for example.
Why is the value in AQ10 0? How would you figure it out manually?
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
I have hidden columns that contain other formula's to try and simplify and avoid information overload. Column AQ10 is 0 because the team "Souths" have 0 points accumulated as they lost their prior match. Would you like me to reveal more columns ?
 
Upvote 0
Ok I agree that my question is convoluted to say the least. Ignore any of my previous thread entries and I'll attempt to better explain myself below.

This is what I want the formula in ColE to do.

Determine whether ColA (Home Team) is higher ("up") or lower ("down") on the league ladder compared to ColB (Away Team).
To determine this the formula should reference ColAQ (Home team competition points) against ColAS (Away team competition points). If ColA has more points than ColB, the result in ColE will be "Up" and if colA has less points than ColB than the answer would be "down".
If both ColA & ColB are on equal competition points than the tiebreaker is used which is ColAR (Home Team For & Against Totals) & ColAT (Away Team For & Against Totals). If both teams are on equal competition points and equal For & Against totals, than ColE is to be "Up".

You will see that "No Data" is displayed when a new season begins (ColAU). This is because both Home & Away teams have not yet played a match and therefore have no competition points or For & Against totals to their name. This is irrelevant to the formula in ColE but its just to explain why the "No Data" is being displayed in the spreadsheet.

If there are any questions PLEASE do not hesitate to ask!


ABEAQARASATAU
1Home TeamAway TeamLeague LadderHome Comp. PointsHome Team F&AAway Comp. PointsAway Team F&ASeason
2southssydneyNo DataNo DataNo DataNo DataNo Data1
3gcoastnqldNo DataNo DataNo DataNo DataNo Data1
4newcastlecanberraNo DataNo DataNo DataNo DataNo Data1
5parramattacanterburyNo DataNo DataNo DataNo DataNo Data1
6manlycronullaNo DataNo DataNo DataNo DataNo Data1
7westssgeorgeNo DataNo DataNo DataNo DataNo Data1
8brisbanepenrithNo DataNo DataNo DataNo DataNo Data1
9melbournenzealandNo DataNo DataNo DataNo DataNo Data1
10southscanterburydown0-140-81
11sydneybrisbanedown2142361
12newcastlemanlyup2160-61
13penrithcanberradown0-360-161
14nqldwestsdown0-18281
15nzealandparramattadown0-14281
16melbournecronullaup214261
17sgeorgegcoastdown0-82181
18brisbanenqldup4420-381
19parramattanewcastledown2-64171
20sydneymelbournedown282131
21canberrasgeorgedown2-122101
22gcoastcronulladown20471
23canterburywestsdown254281
24penrithsouthsdown0-400-271
25manlynzealanddown0-7201
26canterburysydneyupNo DataNo DataNo DataNo Data2
27melbournebrisbanedownNo DataNo DataNo DataNo Data2
28nqldparramattadownNo DataNo DataNo DataNo Data2
29sgeorgecronulladownNo DataNo DataNo DataNo Data2
30gcoastcanberraupNo DataNo DataNo DataNo Data2
31nzealandnewcastledownNo DataNo DataNo DataNo Data2
32manlysouthsupNo DataNo DataNo DataNo Data2
33westspenrithupNo DataNo DataNo DataNo Data2

<tbody>
</tbody>

Spreadsheet Formulas
CellFormula
AQ2=IF(AI2="nd","No Data",SUM((AI2*2)+SUM(AJ2*1)))
AR2=IF(AI2="nd","No Data",SUM((AM2-AN2)))
AS2=IF(AK2="nd","No Data",SUM((AK2*2)+SUM(AL2*1)))
AT2=IF(AK2="nd","No Data",SUM((AO2-AP2)))

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Hi,

Could you explain why E26 = up?

Last result for Canterbury: row 23 as Home
Points (AQ) = 2
Difference (AR) = 5

Last result for Sidney: row 20 as Home
Points (AQ) = 2
Difference (AR) = 8

2=2 a tie, but 5 < 8. So shouldn't the result in E26 be down? Or am i missing something?

M.
 
Upvote 0
Hi Marcelo,

Thanks for the reply, you have pointed out an error of mine.
E26 & > is the beginning of a new season as per ColAU, hence the results in E26 should equal "No Data" as there is no competition data to determine a table position yet.

ABEAQARASATAU
1Home TeamAway TeamLeague LadderHome Comp. PointsHome Team F&AAway Comp. PointsAway Team F&ASeason
2southssydneyNo DataNo DataNo DataNo DataNo Data1
3gcoastnqldNo DataNo DataNo DataNo DataNo Data1
4newcastlecanberraNo DataNo DataNo DataNo DataNo Data1
5parramattacanterburyNo DataNo DataNo DataNo DataNo Data1
6manlycronullaNo DataNo DataNo DataNo DataNo Data1
7westssgeorgeNo DataNo DataNo DataNo DataNo Data1
8brisbanepenrithNo DataNo DataNo DataNo DataNo Data1
9melbournenzealandNo DataNo DataNo DataNo DataNo Data1
10southscanterburydown0-140-81
11sydneybrisbanedown2142361
12newcastlemanlyup2160-61
13penrithcanberradown0-360-161
14nqldwestsdown0-18281
15nzealandparramattadown0-14281
16melbournecronullaup214261
17sgeorgegcoastdown0-82181
18brisbanenqldup4420-381
19parramattanewcastledown2-64171
20sydneymelbournedown282131
21canberrasgeorgedown2-122101
22gcoastcronulladown20471
23canterburywestsdown254281
24penrithsouthsdown0-400-271
25manlynzealanddown0-7201
26canterburysydneyNo DataNo DataNo DataNo DataNo Data2
27melbournebrisbaneNo DataNo DataNo DataNo DataNo Data2
28nqldparramattaNo DataNo DataNo DataNo DataNo Data2
29sgeorgecronullaNo DataNo DataNo DataNo DataNo Data2
30gcoastcanberraNo DataNo DataNo DataNo DataNo Data2
31nzealandnewcastleNo DataNo DataNo DataNo DataNo Data2
32manlysouthsNo DataNo DataNo DataNo DataNo Data2
33westspenrithNo DataNo DataNo DataNo DataNo Data2

<tbody>
</tbody>

Spreadsheet Formulas
CellFormula
AQ2=IF(AI2="nd","No Data",SUM((AI2*2)+SUM(AJ2*1)))
AR2=IF(AI2="nd","No Data",SUM((AM2-AN2)))
AS2=IF(AK2="nd","No Data",SUM((AK2*2)+SUM(AL2*1)))
AT2=IF(AK2="nd","No Data",SUM((AO2-AP2)))

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Maybe this in E2 copied down

=IF(AQ2<>"No Data",IF(OR(AQ2>AS2,AR2>AT2),"up",IF(OR(AS2>AQ2,AT2>AR2),"down","up")),"No Data")

M.
 
Upvote 0
Thanks Marcelo for reply.

Problem I see with your formula is if a team has a better F&A record it automatically ranks higher regardless of the team's competition points which should be the main criteria. For example look at the following table which I have modified results to illustrate my point.

E23 your formula puts the Home team "Canterbury" as "Up" in the ladder in comparison to the Away Team "Wests" even though Canterbury only has 2 competitions points (AQ23) and Wests have 4? (ColAS23). The F&A should only be used as a tiebreaker when both teams have equal competition points.

ABCDEAQARASATAU
1Home TeamAway TeamWinLossLeague LadderHome Comp. PointsHome Team F&A Away Comp. PointsAway Team F&ASeason
2southssydney$1.95$1.85No DataNo DataNo DataNo DataNo Data1
3gcoastnqld$1.62$2.30No DataNo DataNo DataNo DataNo Data1
4newcastlecanberra$1.55$2.45No DataNo DataNo DataNo DataNo Data1
5parramattacanterbury$1.48$2.65No DataNo DataNo DataNo DataNo Data1
6manlycronulla$1.45$2.75No DataNo DataNo DataNo DataNo Data1
7westssgeorge$2.08$1.75No DataNo DataNo DataNo DataNo Data1
8brisbanepenrith$1.43$2.85No DataNo DataNo DataNo DataNo Data1
9melbournenzealand$1.28$3.70No DataNo DataNo DataNo DataNo Data1
10southscanterbury$2.00$1.82down0-140-81
11sydneybrisbane$1.68$2.20down2142361
12newcastlemanly$2.35$1.60up2160-61
13penrithcanberra$1.58$2.40down0-360-161
14nqldwests$1.33$3.35down0-18281
15nzealandparramatta$2.00$1.82down0-14281
16melbournecronulla$1.36$3.20up214261
17sgeorgegcoast$1.65$2.25down0-82181
18brisbanenqld$1.48$2.65up4420-381
19parramattanewcastle$1.38$3.10down2-64171
20sydneymelbourne$2.00$1.82down282131
21canberrasgeorge$1.82$2.00down2-122101
22gcoastcronulla$1.82$2.00down20471
23canterburywests$2.15$1.72up2304281
24penrithsouths$1.82$2.00up0-400-521
25manlynzealand$1.54$2.50down0-7201
26canterburysydney$2.40$1.58No DataNo DataNo DataNo DataNo Data2
27melbournebrisbane$1.62$2.30No DataNo DataNo DataNo DataNo Data2
28nqldparramatta$2.05$1.78No DataNo DataNo DataNo DataNo Data2
29sgeorgecronulla$1.72$2.15No DataNo DataNo DataNo DataNo Data2
30gcoastcanberra$1.35$3.25No DataNo DataNo DataNo DataNo Data2
31nzealandnewcastle$1.54$2.50No DataNo DataNo DataNo DataNo Data2
32manlysouths$1.20$4.65No DataNo DataNo DataNo DataNo Data2
33westspenrith$1.50$2.60No DataNo DataNo DataNo DataNo Data2

<tbody>
</tbody>

Spreadsheet Formulas
CellFormula
E2=IF(AQ2<>"No Data",IF(OR(AQ2>AS2,AR2>AT2),"up",IF(OR(AS2>AQ2,AT2>AR2),"down","up")),"No Data")
AQ2=IF(AI2="nd","No Data",SUM((AI2*2)+SUM(AJ2*1)))
AR2=IF(AI2="nd","No Data",SUM((AM2-AN2)))
AS2=IF(AK2="nd","No Data",SUM((AK2*2)+SUM(AL2*1)))
AT2=IF(AK2="nd","No Data",SUM((AO2-AP2)))

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Sorry, my bad, i had misunderstood the problem

Maybe this

=IF(AQ2<>"No Data",IF(AND(AQ2=AS2,AR2=AT2),"up",IF(AQ2>AS2,"up",IF(AS2>AQ2,"down",IF(AR2>AT2,"up","down")))),"No Data")

M.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,399
Latest member
alchavar

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