Quote:
Originally Posted by VKiprijan
So, if I understood correctly, I need to create a macro or VB code with this name "TeamsWithMostPercentGames" in which I can copy and paste your code.
|
Just copy paste the code in Module1 in the workbook I attached (You could even copy the whole module to your workbook).
Quote:
Originally Posted by VKiprijan
However, from the code itself, I cannot see where I need to insert in it the criteria for the table I want to be shown. For example, if I want to remove, add or change criteria for this table (ie. I want to show statistics for the teams that have played GG3+ (both teams need to score a goal and there should be at least 3 or more goals per game) or 1GG (both teams scored a goal in the first half of the game), how I can do that? Also, is there any simplier way to create this kind of statistical table?
|
The udf is for giving you the statistics of numbers of goals scored by both teams in games.
What you're wanting with GG3+ and 1GG (and more?) is quite different, and would need another function/s to be written.
Writing on-sheet formulae using only the built-in sheet functions is made difficult by your arrangement of raw data; each row represents a game, but there are 2 teams on each row and you want statistics on a per team basis. When I explored doing this in Excel 2016 (including using your helper columns O:AN) it just got far too convoluted and I gave up; such a formula would be incomprehensible and difficult to maintain/manage anyway. It still isn't straightforward in more recent versions of Excel.
A simpler way to create a statistical table? Well my first offering using
Power Query is a more robust way of extracting, transforming and presenting the data both in a plain table and possibly pivot tables but would require significant learning from you that I fear you wouldn't call it 'simpler'.
You want quite a range of bespoke statistics, so be aware that it takes some significant time for someone to understand them, let alone develop a solution. Is there anywhere on the web where these statistics are explained and used? It would help.