Sure i will help you out with this try to put this code it will work for you.
Code:
Private Sub cmdTournament_Click()
Dim s As Range, i As Variant, t As Range, w As Range, _
cc As Range, c As Range, w2 As Range, j As Integer, Val As Integer
Val = Sheet3.Range("Tournament").Value
Set s = Sheet4.Range("Scores")
Set t = Sheet3.Range("Table")
Set w = t.Cells(1, 1).End(xlToRight).Offset(0, 1) 'first empty week
Set w2 = t.Cells(1, 1).Offset(0, 31).End(xlToRight).Offset(0, Val)
Application.Calculation = xlManual 'turn off calculations
For Each cc In s
For j = -1 To 4 Step 5
Set c = cc.Offset(0, j)
i = Application.Match(c.Offset(0, -3), t, 0) 'get player position
If IsError(i) Then
MsgBox "Cannot locate " & c.Offset(0, -3) & " in the table."
Else
w2.Cells(i, 1).Value = c
End If
Next j
Next cc
w2.Range("A1:A" & t.Rows.Count).Replace What:="", Replacement:="DNP", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False
Application.Calculation = xlAutomatic 'turn on calculations
End Sub
Bookmarks