Skip to content

Instantly share code, notes, and snippets.

@jleeothon
Created April 17, 2015 13:43
Show Gist options
  • Save jleeothon/d865093629d002783328 to your computer and use it in GitHub Desktop.
Save jleeothon/d865093629d002783328 to your computer and use it in GitHub Desktop.
Repeat a certain experiment for queue models
Sub RepeatExperiment()
'
' RepeatExperiment Macro
'
'
For i=0 To 40
Sheets("Simulación").Select
Sheets("Simulación").Copy After:=Sheets(Sheets.Count)
Range("B2").Select
ActiveCell.FormulaR1C1 = "=RAND()"
Range("B2").Select
Selection.AutoFill Destination:=Range("B2:B501")
Range("B2:B501").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Range("F2").Select
ActiveCell.FormulaR1C1 = "=RAND()"
Range("F2").Select
Selection.AutoFill Destination:=Range("F2:F501")
Range("F2:F501").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Next
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment