performance – Daily Fantasy (DFS) Lineup Generator in Excel VBA

I have a macro I have been using to generate daily fantasy (dfs) lineups for soccer matches. I would like to know where I can speed up my code so I can run more simulations.

Briefly, I have a worksheet in which I try to ‘simulate’ individual scores for each player in a match (e.g. “ITAvENG” in the code below). This uses the rand() formula in excel so I have to copy and paste values of these scores each time my code runs.

I then call the Excel Solver to calculate the optimal lineup based on those scores (within the constraints of the game/site).

Finally it copies and pastes that lineup into a different worksheet before repeating the process again.

I can currently run 1,000 sims in about 10-15 minutes* but I know I can improve this speed (e.g. I think I am copying and pasting inefficiently?). Can someone advise please?

*There is a lot going on elsewhere in the workbook that I think might be slowing me down as well, I would be happy to explain / share this privately.

Sub Showdown()

Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.DisplayStatusBar = False

Dim StartTime As Double
Dim MinutesElapsed As String
StartTime = Timer

Dim i As Integer

For i = 0 To 999


Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False


SolverAdd CellRef:="$AC$16:$AC$39", Relation:=1, FormulaText:="1"
SolverAdd CellRef:="$Z$3", Relation:=2, FormulaText:="1"
SolverAdd CellRef:="$Z$4", Relation:=2, FormulaText:="5"
SolverAdd CellRef:="$AC$3", Relation:=1, FormulaText:="50000"
SolverAdd CellRef:="$Z$6", Relation:=3, FormulaText:="1"
SolverAdd CellRef:="$Z$7", Relation:=3, FormulaText:="1"

SolverOk SetCell:="$AC$4", MaxMinVal:=1, ValueOf:=0, ByChange:="$AA$16:$AB$39", _
Engine:=2, EngineDesc:="Simplex LP"
SolverAdd CellRef:="$AA$16:$AB$39", Relation:=5, FormulaText:="binary"
SolverSolve True
Sheets("ITAvENG Lineups").Select
Range("$C$12").Offset(i, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=True, Transpose:=True

Next i

Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
Application.DisplayStatusBar = True

MinutesElapsed = Format((Timer - StartTime) / 86400, "hh:mm:ss")

MsgBox "This code ran successfully in " & MinutesElapsed & "minutes", vbInformation

End Sub