Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #18  
Old 10-29-2024, 12:03 PM
p45cal's Avatar
p45cal p45cal is offline Formula to count % of goals in a total number of games Windows 10 Formula to count % of goals in a total number of games Office 2021
Expert
 
Join Date: Apr 2014
Posts: 963
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Quote:
Originally Posted by VKiprijan View Post
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 View Post
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.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
count formula to count based on multiple criteria and return unique rows Sphinxakop Excel 0 02-01-2023 12:18 PM
Formula to count % of goals in a total number of games How can I count per year and per week the total number of times a code occurs Stefan_Deckers Excel 3 09-19-2020 02:36 PM
Formula to count % of goals in a total number of games Why does the total row of my pivot table not tie to the real count using distinct count wheddingsjr Excel 4 09-01-2020 09:52 PM
Formula to count % of goals in a total number of games Formula for calculating total when number and letter in one cell Oleg Excel 5 02-22-2017 03:05 AM
Formula to count % of goals in a total number of games Word: count total page of each section salmonrose Word 1 10-15-2011 05:10 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft