Create a dynamic football tournament event macro

MrPink1986

Active Member
Joined
May 1, 2012
Messages
252
Hi there,

I would like to create a macro that would save me so much time and also be fully correct as my current approach is quite manual.
Let me describe what I require:

Inputs;
Team Name- this will list the teams taking part - this will range from 1-16
Number of Groups - this will be range from 1-4
No of teams in the group - this will range from 3-5

Logic;
The number of teams in the group in the number of groups will come from the Team name and list and will only contain unique values.

Inputs;
Number of Pitches - 2-4
Event start Time - time value xx:xx
Length of each game - variable 5-15 mins

Logic;
The macro should create start times for each game and assign each game a pitch number. There should only be one game at each time with that team involved. Once the first game is completed the macro should be able to list the next kick off time - the first game will conclude when the Event start Time + Length of each game + 3 mins elapses.

Below is the final output

GROUP AGROUP BGROUP CGROUP D
Team nameTeam nameTeam nameTeam name
Team ATeam ETeam ITeam M
Team BTeam FTeam JTeam n
Team CTeam GTeam KTeam O
Team DTeam HTeam LTeam P
Group APitchKickoff TimeGroup BPitchKickoff TimeGroup CPitchKickoff TimeGroup DPitchKickoff Time
Team ATeam BA17:30Team ETeam FB17:30Team ITeam JC17:30Team MTeam nD17:30
Team BTeam CA17:45Team FTeam GB17:45Team JTeam KC17:45Team nTeam OD17:45
Team ATeam DA18:00Team ETeam HB18:00Team ITeam LC18:00Team MTeam PD18:00
Team CTeam AA18:15Team GTeam EB18:15Team KTeam IC18:15Team OTeam MD18:15
Team DTeam CA18:30Team HTeam GB18:30Team LTeam KC18:30Team PTeam OD18:30
Team BTeam DA18:45Team FTeam HB18:45Team JTeam LC18:45Team nTeam PD18:45

<tbody>
</tbody>
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,214,788
Messages
6,121,600
Members
449,038
Latest member
Arbind kumar

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