我希望在固定的时间内重复播放,而不必点击" ctrl + e"运行后每2分钟一次。我怎么循环它一定次数,比如说200?我基本上只记录了自己做了一大堆动作,然后为宏创建了一个热键。每次运行大约需要2分钟......我需要做大约200次。我觉得必须有一个更有效的方法来解决这个问题。任何建议表示赞赏!
子游戏结束() ' '结束宏 ' '键盘快捷键:Ctrl + e '
Sheets("Sheet3").Select
Range("A1").Select
Selection.copy
Sheets("Historical Team Stats").Select
Range("DZ1").Select
ActiveSheet.Paste
Range("EA2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.copy
Sheets("conversions").Select
ActiveWindow.ScrollColumn = 179
ActiveWindow.ScrollColumn = 178
ActiveWindow.ScrollColumn = 177
ActiveWindow.ScrollColumn = 175
ActiveWindow.ScrollColumn = 174
ActiveWindow.ScrollColumn = 172
ActiveWindow.ScrollColumn = 170
ActiveWindow.ScrollColumn = 169
ActiveWindow.ScrollColumn = 168
ActiveWindow.ScrollColumn = 167
ActiveWindow.ScrollColumn = 166
ActiveWindow.ScrollColumn = 165
ActiveWindow.ScrollColumn = 164
ActiveWindow.ScrollColumn = 163
ActiveWindow.ScrollColumn = 162
ActiveWindow.ScrollColumn = 161
ActiveWindow.ScrollColumn = 160
ActiveWindow.ScrollColumn = 159
ActiveWindow.ScrollColumn = 158
ActiveWindow.ScrollColumn = 157
ActiveWindow.ScrollColumn = 156
ActiveWindow.ScrollColumn = 155
ActiveWindow.ScrollColumn = 154
ActiveWindow.ScrollColumn = 153
ActiveWindow.ScrollColumn = 152
ActiveWindow.ScrollColumn = 150
ActiveWindow.ScrollColumn = 149
ActiveWindow.ScrollColumn = 147
ActiveWindow.ScrollColumn = 146
ActiveWindow.ScrollColumn = 143
ActiveWindow.ScrollColumn = 142
ActiveWindow.ScrollColumn = 140
ActiveWindow.ScrollColumn = 138
ActiveWindow.ScrollColumn = 137
ActiveWindow.ScrollColumn = 136
ActiveWindow.ScrollColumn = 135
ActiveWindow.ScrollColumn = 134
ActiveWindow.ScrollColumn = 133
ActiveWindow.ScrollColumn = 132
ActiveWindow.ScrollColumn = 131
ActiveWindow.ScrollColumn = 129
ActiveWindow.ScrollColumn = 120
ActiveWindow.ScrollColumn = 109
ActiveWindow.ScrollColumn = 104
ActiveWindow.ScrollColumn = 98
ActiveWindow.ScrollColumn = 94
ActiveWindow.ScrollColumn = 90
ActiveWindow.ScrollColumn = 84
ActiveWindow.ScrollColumn = 79
ActiveWindow.ScrollColumn = 75
ActiveWindow.ScrollColumn = 70
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 59
ActiveWindow.ScrollColumn = 55
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 47
ActiveWindow.ScrollColumn = 45
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 42
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 37
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 1
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.Replace What:="#N/A", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.SpecialCells(xlCellTypeBlanks).Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 22
Range("AH3").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-31]="""",""#N/A"",IF(RC[-31]>0,1,-1)+R[-1]C)"
Range("AH3").Select
Selection.copy
Range("AG3").Select
ActiveSheet.Paste
Range(Selection, Selection.End(xlToRight)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.copy
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Paste
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 30
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 37
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 42
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 45
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 47
ActiveWindow.ScrollColumn = 48
ActiveWindow.ScrollColumn = 49
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 51
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 53
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 55
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 57
ActiveWindow.ScrollColumn = 58
ActiveWindow.ScrollColumn = 59
ActiveWindow.ScrollColumn = 60
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 63
ActiveWindow.ScrollColumn = 65
ActiveWindow.ScrollColumn = 67
ActiveWindow.ScrollColumn = 70
ActiveWindow.ScrollColumn = 75
ActiveWindow.ScrollColumn = 77
ActiveWindow.ScrollColumn = 79
ActiveWindow.ScrollColumn = 82
ActiveWindow.ScrollColumn = 85
ActiveWindow.ScrollColumn = 87
ActiveWindow.ScrollColumn = 89
ActiveWindow.ScrollColumn = 90
ActiveWindow.ScrollColumn = 91
ActiveWindow.ScrollColumn = 92
ActiveWindow.ScrollColumn = 93
ActiveWindow.ScrollColumn = 94
ActiveWindow.ScrollColumn = 95
ActiveWindow.ScrollColumn = 96
ActiveWindow.ScrollColumn = 97
ActiveWindow.ScrollColumn = 98
ActiveWindow.ScrollColumn = 99
ActiveWindow.ScrollColumn = 100
ActiveWindow.ScrollColumn = 101
ActiveWindow.ScrollColumn = 102
ActiveWindow.ScrollColumn = 103
Application.CutCopyMode = False
Sheets("raw data").Select
Rows("2:2").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A2").Select
Sheets("Historical Team Stats").Select
ActiveWindow.ScrollColumn = 141
ActiveWindow.ScrollColumn = 140
ActiveWindow.ScrollColumn = 138
ActiveWindow.ScrollColumn = 132
ActiveWindow.ScrollColumn = 128
ActiveWindow.ScrollColumn = 125
ActiveWindow.ScrollColumn = 121
ActiveWindow.ScrollColumn = 117
ActiveWindow.ScrollColumn = 114
ActiveWindow.ScrollColumn = 113
ActiveWindow.ScrollColumn = 112
ActiveWindow.ScrollColumn = 111
ActiveWindow.ScrollColumn = 110
ActiveWindow.ScrollColumn = 109
ActiveWindow.ScrollColumn = 110
ActiveWindow.ScrollRow = 166
ActiveWindow.ScrollRow = 155
ActiveWindow.ScrollRow = 140
ActiveWindow.ScrollRow = 57
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 31
ActiveWindow.ScrollRow = 12
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 4
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollColumn = 109
ActiveWindow.ScrollColumn = 110
ActiveWindow.ScrollColumn = 111
ActiveWindow.ScrollColumn = 112
ActiveWindow.ScrollColumn = 113
ActiveWindow.ScrollColumn = 114
ActiveWindow.ScrollColumn = 115
ActiveWindow.ScrollColumn = 116
ActiveWindow.ScrollColumn = 117
ActiveWindow.ScrollColumn = 118
ActiveWindow.ScrollColumn = 119
ActiveWindow.ScrollColumn = 120
ActiveWindow.ScrollColumn = 121
ActiveWindow.ScrollColumn = 122
ActiveWindow.ScrollColumn = 123
ActiveWindow.ScrollColumn = 124
ActiveWindow.ScrollColumn = 125
ActiveWindow.ScrollColumn = 126
ActiveWindow.ScrollColumn = 127
ActiveWindow.ScrollColumn = 128
ActiveWindow.ScrollColumn = 129
ActiveWindow.ScrollColumn = 130
ActiveWindow.ScrollColumn = 131
ActiveWindow.ScrollColumn = 132
ActiveWindow.ScrollColumn = 131
ActiveWindow.ScrollColumn = 130
ActiveWindow.ScrollColumn = 129
ActiveWindow.ScrollColumn = 128
ActiveWindow.ScrollColumn = 127
ActiveWindow.ScrollColumn = 126
ActiveWindow.ScrollColumn = 125
ActiveWindow.ScrollColumn = 124
ActiveWindow.ScrollColumn = 123
ActiveWindow.ScrollColumn = 124
Range("DZ1").Select
Selection.copy
Sheets("raw data").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("conversions").Select
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 47
ActiveWindow.ScrollColumn = 49
ActiveWindow.ScrollColumn = 51
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 53
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 55
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 57
ActiveWindow.ScrollColumn = 58
ActiveWindow.ScrollColumn = 59
ActiveWindow.ScrollColumn = 60
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 63
ActiveWindow.ScrollColumn = 65
ActiveWindow.ScrollColumn = 68
ActiveWindow.ScrollColumn = 74
ActiveWindow.ScrollColumn = 81
ActiveWindow.ScrollColumn = 92
ActiveWindow.ScrollColumn = 105
ActiveWindow.ScrollColumn = 120
ActiveWindow.ScrollColumn = 123
ActiveWindow.ScrollColumn = 125
ActiveWindow.ScrollColumn = 126
ActiveWindow.ScrollColumn = 125
ActiveWindow.ScrollColumn = 124
ActiveWindow.ScrollColumn = 123
ActiveWindow.ScrollColumn = 120
ActiveWindow.ScrollColumn = 117
ActiveWindow.ScrollColumn = 113
ActiveWindow.ScrollColumn = 109
ActiveWindow.ScrollColumn = 106
ActiveWindow.ScrollColumn = 104
ActiveWindow.ScrollColumn = 103
ActiveWindow.ScrollColumn = 102
ActiveWindow.ScrollColumn = 101
ActiveWindow.ScrollColumn = 100
ActiveWindow.ScrollColumn = 99
ActiveWindow.ScrollColumn = 98
ActiveWindow.ScrollColumn = 97
ActiveWindow.ScrollColumn = 96
ActiveWindow.ScrollColumn = 95
ActiveWindow.ScrollColumn = 94
ActiveWindow.ScrollColumn = 93
ActiveWindow.ScrollColumn = 92
ActiveWindow.ScrollColumn = 91
ActiveWindow.ScrollColumn = 90
ActiveWindow.ScrollColumn = 89
ActiveWindow.ScrollColumn = 88
ActiveWindow.ScrollColumn = 87
ActiveWindow.ScrollColumn = 86
ActiveWindow.ScrollColumn = 85
ActiveWindow.ScrollColumn = 84
ActiveWindow.ScrollColumn = 83
ActiveWindow.ScrollColumn = 82
ActiveWindow.ScrollColumn = 81
Range("CQ2").Select
Range(Selection, Selection.End(xlToRight)).Select
Application.CutCopyMode = False
Selection.copy
Sheets("raw data").Select
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet3").Select
Rows("1:1").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
Sheets("Historical Team Stats").Select
Range("DZ1").Select
End Sub