#31
|
|||
|
|||
Quote:
|
#32
|
||||
|
||||
I've dealt with the VSTACK one, the rest will have to wait until tomorrow (UK).
|
#33
|
|||
|
|||
No problem mate, it's past 1:00 there. You get some rest.
|
#34
|
||||
|
||||
try in AI2:
Code:
=LET(rws,($D$2:$D$97=$D2)*($G$2:$G$97=$G2),TRANSPOSE(INDEX(SORT(CHOOSE({1,2},VALUE(FILTERXML("<a><b>"&TEXTJOIN("</b><b>",,FILTER($Z$2:$AA$97,rws))&"</b></a>","//b")),VALUE(FILTERXML("<a><b>"&TEXTJOIN("</b><b>",,FILTER($N$2:$O$97,rws))&"</b></a>","//b"))),,-1),,2))) Bed. edit. use Code:
=MATCH(ROUND(Z2,9),ROUND(SORT(VALUE(FILTERXML("<a><b>"&TEXTJOIN("</b><b>",,FILTER($Z$2:$AA$97,($D$2:$D$97=$D2)*($G$2:$G$97=$G2)))&"</b></a>","//b")),,-1),9),0) |
#35
|
|||
|
|||
Weldone mate works like a charm.
Without these formulas I may had to do these the old fashion way which was to copy paste results week by week (something I did during the summer). This would save me hours/days/weeks. Are you available on the weekend/next week because I'm planning to mass calculate my data then? Your formulas look sound and solid and hopefully I won't be needing you again but I'll let you know if I encounter any issue. I'm really gratefule for your help again. |
#36
|
|||
|
|||
Hi Pascal,
The formula works great when teams have played equal number of games every matchday/week. However, when there are less than 10 matches played for whatever reason the positions are calculated wrongly as you can seen in the spreadsheet below for week 24. 'par' v 'udi' is postponed in that particular week and thus teams are ranked from 1 to 18. The expected results are in columns N and O. What do you think is a solution for that little problem? |
#37
|
||||
|
||||
So par v udi was postponed until 8th April 2015, week 29 (row 290)
If you extend your calculations in columns Z and to the right, to row 290 or more, then change the 29 in cell D290 to 24, it goes a long way to putting things right. Before you make that change, you'll notice also, that 11 fixtures were played for week 29; that's going to snarl things up. This goes back to my msg#8 about what is a 'round' and how is it defined? At the moment, you've said it was league and week. Should it be something different? However: In your first message in this thread you said you wanted "to figure home and away teams' league position ahead of their match" I see that in your expected results you seem to have included the ranks of the missing udi and par calculated from an earlier week/round's values in columns AN:AO. However, the values for those teams are for fewer matches played, so I think they're not comparable… but you may say different. I think it could be possible to look at the most recent values (regardless of week) for all the teams playing in a given league and use those scores in columns AN:AO to rank them. This would make the formula even more complicated, and with your version of Excel, longer, to the point that it might be easier to have a user defined function (macro function) which would need vba code and for macros to be enabled and the file would become a .xlsm file. Acceptable? A Power Query solution might also be possible (built in to Excel since version 2016) and would look neater. I'll await comments on all the above before doing anything. |
#38
|
||||
|
||||
Quote:
Your solution of changing weeks back to their originals don't seem to work. As you would see Udi is calculated to be on 8th position eventhough they're 13th on April the 8th as it would show in the expected result (N:O) and if you scroll above to week 24 you would see most teams' positions are off by one place for whatever reason. Even if it did work it would be very time consuming. For a league like Italy where fixture postement is rare it might be practical but for leagues like England where fixture postponement is a regular occurence it would be very challenging. My own solution wasn't too disimlar to this. I added the PPD fixtures in their original week regardless without inputing the result obviously and input their points from columns AA and AB (knew these might come handy somewhere down the line) into columns P and Q and it works perfectly. But again, it is very time consuming and error-prone because of its hands-on nature. Quote:
Quote:
I calculated positions you see in columns N and O with copy and paste method over the summer (which was very time consuming). Now I have realised I also need to know the point difference of teams with places below and above ahead of their match hence why I'm doing this again but hopefully with a faster/more effective method. Quote:
My original worksheet with over 60 seasons of data is a 'Macro-Enabled Workbook'. I don't know the technical term I coded in a VBA which speeds up my copy-pasting that I do week after week (happy to share it with you if you need). |
#39
|
|||
|
|||
Quote:
|
#40
|
|||
|
|||
I'm not basing it on dates but weeks rather. The reason why the formula fails is because it ranks teams from 1-18 rather than 1-20 when there is A PPD fixture (excluding teams that didn't play from the rankings basically). if two matches are PPD then teams will be ranked 1 to 16.
'base them on scheduled weeks instead, e.g. as number like 202401. When the game was postponed, it will not accounted until it is really played. And then it will be accounted for scheduled week, not for week it was really played at.' Would you elaborate more, please? |
#41
|
||||
|
||||
I've managed, using Power Query (green columns below), to get the rankings for week 24 to tally with your expected rankings in columns N:O :
2024-01-08_022418.jpg I've done this by including the missing teams (par & udi) rank values from their most recent rank values before week 24 (from week 23 in this case): 2024-01-08_023145.jpg However, with week 29, when the postponed par/udi fixture was played, there are 2 fixtures each played by udi & par: 2024-01-08_023531.jpg Here, par and udi have both taken part in 2 fixtures each in week 29, you can see that cells BJ283:BJ284 are blank because it's taken account only the most recent (last) fixtures' rank values for those 2 teams when calculating ranking. I see you've got the same ranks (20 and 13) for week 29 when there are in fact different rank values which would alter their ranks. How did you go about assigning those ranks/positions? |
#42
|
|||
|
|||
Quote:
Quote:
I obtained those ranking with my built table. It's flawless but very time consuming for massive data and almost impractical. I'd be happy to share a basic version on here if you would like. Also, please note that 'par' were given points penalty that season and were deducted points at different times so if you happen to calculate their points and see different points tally to mine then that would be the reason. However, Udi's point tally should come out same as mine. |
#43
|
||||
|
||||
Quote:
Quote:
Yes please. |
#44
|
|||
|
|||
I'm getting an error when trying to attach it. Something about security token.
'Your submission could not be processed because a security token was missing. If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.' Would you be able to PM me your email so I would send it to you there; or guide me to deal with this error? |
#45
|
|||
|
|||
^^^Ignore this, the file was too big^^^
Yes, Is it possible to use dates? It would produce a much more valid and accurate data; but I imagine the current formula will still leave out teams if dates are used. It will rank teams 1-4 when 4 teams play on a certain date for example. I also plan to calculate positions in international football. In International football a lot of times groups are made up of odd number of teams meaning one team will sit out every matchday. This formula would fail to recognise that there also. Find the spreadsheet below. I basically copy-paste results of weeks from 'Data' onto A30 : D39 on 'Standings'. The results will then be copy-pasted to 'MinedData' The table on 'Standings' would take date of 1st match of the week and calculate point totals, goal diffs and all of that for every team before that date and adjust rankings. When there are PPD matches I do them separately. They usually stick out since they're played in midweek (Tue, Wed, Thu). It usually takes 20-30 mins to calculate a regular season's whole data and a whole lot more for other competitions such as World Cup/Champions League etc.... |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cross-reference with full context a numbered list inside another multilevel list (list style) | MatLcq | Word | 0 | 02-01-2021 06:00 AM |
Calculate a Date | shawn.low@cox.net | Mail Merge | 5 | 12-12-2019 03:22 PM |
are there any good free golf league programs out there | kener40 | Other Software | 0 | 03-28-2014 05:54 PM |
calculate age | userman | Excel | 8 | 06-02-2012 10:59 PM |
Calculate formula base of list menu | rkeles | Excel | 4 | 09-22-2010 12:38 AM |