Need Help making a tournament sheet

CBL

New Member
Joined
Sep 19, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

So we have an ongoing league and on game night players are assigned to pods of 4.
Initially, we manually assigned players to their first pod of the night.

Then they would score 3 points for win
1 point for second


Can someone point me in what I need to look up to have

A list of players with their current score (from previous nights)
and then have the sheet (based on their score) assign those into 'pods'
with 4 people per pod.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Create two sheets. Sheet "Players" and sheet "Poule"

Sheet players should look like this:
tournament.xlsm
AB
1PlayerNamePlayerScore
2b0
3f0
4j0
5n0
6a0
7i0
8m0
9d0
10k0
11g0
12e0
13c0
14l0
15h0
16o0
17p0
Players


Create a button and assign following macro to it:
VBA Code:
Sub CreatePoule()
Dim PlayerNames As Range
Dim PlayerScore As Range
Dim PlayersWorkSheet As Worksheet
Dim ranking As Integer
Dim rankedrow As Double
Dim rng As Range
Dim ranked As Variant


Set WS = Worksheets("Players")

For ranking = 1 To 16
Worksheets("Poule").Cells(ranking, 1) = ranking
Next ranking

Range("a2:b17").Copy Destination:=Worksheets("poule").Range("b1")

Worksheets("poule").Sort.SortFields.Clear
Worksheets("Poule").Sort.SortFields.Add2 Key:=Range("C1:c16" _
        ), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
    With Worksheets("poule").Sort
        .SetRange Range("b1:c16")
        .Header = xlNo
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With


Worksheets("poule").Select
Sheets("Poule").Range("$A$1").EntireRow.Insert
Range("a1") = "Ranking"
Range("b1") = "Player Name"
Range("c1") = "Points"
Range("d1") = "Result"





Sheets("Poule").Range("$A$6").EntireRow.Insert
Sheets("Poule").Range("$A$11").EntireRow.Insert
Sheets("Poule").Range("$A$16").EntireRow.Insert
Range("a21:d30").ClearContents
Range("d2:d30").ClearContents
Range("f4:f5").ClearContents
Range("f3") = "Enter 1 or 2 for every poule in column D"
Range("a1").Select


End Sub


Create a button in sheet poule and assign following macro to it:
VBA Code:
Sub EnteringResult()

For enterresult = 1 To 20
If Cells(enterresult, 4) = 1 Then
Cells(enterresult, 3) = Cells(enterresult, 3) + 3
End If
If Cells(enterresult, 4) = 2 Then
Cells(enterresult, 3) = Cells(enterresult, 3).Value + 1
End If



Next enterresult

Range("b2:c20").Copy Destination:=Worksheets("Players").Range("a2")
Worksheets("players").Activate
Rows("6:6").Delete Shift:=xlUp
Rows("10:10").Delete Shift:=xlUp
Rows("14:14").Delete Shift:=xlUp


End Sub
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,196
Members
449,072
Latest member
DW Draft

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