こんにちは私は特定のドライブの特定のテキストファイルからデータを挿入するマクロを持っています(K:...などのbrowleft.txt)が、Excelワークシートのドライブとフォルダからマクロを読み取れるようにしたいと思いますがあり、変数名が同じ末尾のテキストファイル(alexbrowleft.txtやgrahambrowright.txtなど)からも可能です...これは可能であり、誰かが私を助けることができます...これが以下のマクロです。 ..
Sub insert()
'
' insert Macro
' insert
'
' Keyboard Shortcut: Ctrl+i
'
Range("A4").Select
ActiveCell.FormulaR1C1 = "left brow"
Range("B4").Select
With ActiveSheet.QueryTables.Add(Connection:="TEXT;K:\browleft.txt", _
Destination:=Range("$B$4"))
.Name = "browleft_8"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 850
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 _
, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.refresh BackgroundQuery:=False
End With
Range("A6").Select
ActiveCell.FormulaR1C1 = "right brow"
Range("B6").Select
With ActiveSheet.QueryTables.Add(Connection:="TEXT;K:\browright.txt", _
Destination:=Range("$B$6"))
.Name = "browright_8"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 850
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 _
, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.refresh BackgroundQuery:=False
End With
Range("A8").Select
ActiveCell.FormulaR1C1 = "eye left"
Range("B8").Select
With ActiveSheet.QueryTables.Add(Connection:="TEXT;K:\eyeleft.txt", _
Destination:=Range("$B$8"))
.Name = "eyeleft_8"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 850
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 _
, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.refresh BackgroundQuery:=False
End With
Range("A10").Select
ActiveCell.FormulaR1C1 = "right eye"
Range("B10").Select
With ActiveSheet.QueryTables.Add(Connection:="TEXT;K:\eyeright.txt", _
Destination:=Range("$B$10"))
.Name = "eyeright_8"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 850
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 _
, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.refresh BackgroundQuery:=False
End With
Range("A12").Select
ActiveCell.FormulaR1C1 = "jaw"
Range("B12").Select
With ActiveSheet.QueryTables.Add(Connection:="TEXT;K:\jaw.txt", Destination _
:=Range("$B$12"))
.Name = "jaw_8"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 850
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 _
, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.refresh BackgroundQuery:=False
End With
Range("A14").Select
ActiveCell.FormulaR1C1 = "mouth height"
Range("B14").Select
With ActiveSheet.QueryTables.Add(Connection:="TEXT;K:\mouthheight.txt", _
Destination:=Range("$B$14"))
.Name = "mouthheight_8"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 850
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 _
, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.refresh BackgroundQuery:=False
End With
Range("A16").Select
ActiveCell.FormulaR1C1 = "mouth width"
Range("B16").Select
With ActiveSheet.QueryTables.Add(Connection:="TEXT;K:\mouthwidth.txt", _
Destination:=Range("$B$16"))
.Name = "mouthwidth_8"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 850
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 _
, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.refresh BackgroundQuery:=False
End With
Range("A18").Select
ActiveCell.FormulaR1C1 = "nostrils"
Range("B18").Select
With ActiveSheet.QueryTables.Add(Connection:="TEXT;K:\nostrils.txt", _
Destination:=Range("$B$18"))
.Name = "nostrils_9"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 850
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 _
, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.refresh BackgroundQuery:=False
End With
Range("17:17,15:15,13:13,11:11,9:9,7:7,5:5").Select
Range("A5").Activate
Selection.Delete Shift:=xlUp
Range("A4").Select
ActiveCell.FormulaR1C1 = "Left Brow"
Range("A5").Select
ActiveCell.FormulaR1C1 = "Right Brow"
Range("A6").Select
ActiveCell.FormulaR1C1 = "Eye Left"
Range("A7").Select
ActiveCell.FormulaR1C1 = "Eye Right"
Range("A8").Select
ActiveCell.FormulaR1C1 = "Jaw"
Range("A9").Select
ActiveCell.FormulaR1C1 = "Mouth Height"
Range("A10").Select
ActiveCell.FormulaR1C1 = "Mouth Width"
Range("A11").Select
ActiveCell.FormulaR1C1 = "Nostrils"
Range("A12").Select
End Sub
Sub deletedata()
'
' deletedata Macro
'
' Keyboard Shortcut: Ctrl+d
'
Range("B4").Select
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 30
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 58
ActiveWindow.ScrollColumn = 62
ActiveWindow.ScrollColumn = 67
ActiveWindow.ScrollColumn = 71
ActiveWindow.ScrollColumn = 75
ActiveWindow.ScrollColumn = 79
ActiveWindow.ScrollColumn = 83
ActiveWindow.ScrollColumn = 86
ActiveWindow.ScrollColumn = 90
ActiveWindow.ScrollColumn = 94
ActiveWindow.ScrollColumn = 98
ActiveWindow.ScrollColumn = 103
ActiveWindow.ScrollColumn = 107
ActiveWindow.ScrollColumn = 111
ActiveWindow.ScrollColumn = 116
ActiveWindow.ScrollColumn = 120
ActiveWindow.ScrollColumn = 124
ActiveWindow.ScrollColumn = 129
ActiveWindow.ScrollColumn = 133
ActiveWindow.ScrollColumn = 138
ActiveWindow.ScrollColumn = 142
ActiveWindow.ScrollColumn = 146
ActiveWindow.ScrollColumn = 149
ActiveWindow.ScrollColumn = 153
ActiveWindow.ScrollColumn = 156
ActiveWindow.ScrollColumn = 163
ActiveWindow.ScrollColumn = 170
ActiveWindow.ScrollColumn = 176
ActiveWindow.ScrollColumn = 181
ActiveWindow.ScrollColumn = 187
ActiveWindow.ScrollColumn = 193
ActiveWindow.ScrollColumn = 199
ActiveWindow.ScrollColumn = 204
ActiveWindow.ScrollColumn = 208
ActiveWindow.ScrollColumn = 211
ActiveWindow.ScrollColumn = 214
ActiveWindow.ScrollColumn = 216
ActiveWindow.ScrollColumn = 218
ActiveWindow.ScrollColumn = 219
ActiveWindow.ScrollColumn = 221
ActiveWindow.ScrollColumn = 222
ActiveWindow.ScrollColumn = 223
ActiveWindow.ScrollColumn = 224
ActiveWindow.ScrollColumn = 225
ActiveWindow.ScrollColumn = 226
ActiveWindow.ScrollColumn = 227
ActiveWindow.ScrollColumn = 228
ActiveWindow.ScrollColumn = 229
ActiveWindow.ScrollColumn = 230
ActiveWindow.ScrollColumn = 231
ActiveWindow.ScrollColumn = 233
ActiveWindow.ScrollColumn = 234
ActiveWindow.ScrollColumn = 236
ActiveWindow.ScrollColumn = 238
ActiveWindow.ScrollColumn = 240
ActiveWindow.ScrollColumn = 243
ActiveWindow.ScrollColumn = 244
ActiveWindow.ScrollColumn = 247
ActiveWindow.ScrollColumn = 248
ActiveWindow.ScrollColumn = 250
ActiveWindow.ScrollColumn = 252
ActiveWindow.ScrollColumn = 253
ActiveWindow.ScrollColumn = 254
ActiveWindow.ScrollColumn = 255
ActiveWindow.ScrollColumn = 256
ActiveWindow.ScrollColumn = 257
ActiveWindow.ScrollColumn = 258
ActiveWindow.ScrollColumn = 256
ActiveWindow.ScrollColumn = 252
ActiveWindow.ScrollColumn = 232
ActiveWindow.ScrollColumn = 223
ActiveWindow.ScrollColumn = 214
ActiveWindow.ScrollColumn = 204
ActiveWindow.ScrollColumn = 196
ActiveWindow.ScrollColumn = 186
ActiveWindow.ScrollColumn = 176
ActiveWindow.ScrollColumn = 166
ActiveWindow.ScrollColumn = 157
ActiveWindow.ScrollColumn = 148
ActiveWindow.ScrollColumn = 141
ActiveWindow.ScrollColumn = 135
ActiveWindow.ScrollColumn = 130
ActiveWindow.ScrollColumn = 125
ActiveWindow.ScrollColumn = 120
ActiveWindow.ScrollColumn = 116
ActiveWindow.ScrollColumn = 112
ActiveWindow.ScrollColumn = 109
ActiveWindow.ScrollColumn = 108
ActiveWindow.ScrollColumn = 107
ActiveWindow.ScrollColumn = 105
ActiveWindow.ScrollColumn = 103
ActiveWindow.ScrollColumn = 101
ActiveWindow.ScrollColumn = 99
ActiveWindow.ScrollColumn = 97
ActiveWindow.ScrollColumn = 94
ActiveWindow.ScrollColumn = 91
ActiveWindow.ScrollColumn = 88
ActiveWindow.ScrollColumn = 86
ActiveWindow.ScrollColumn = 83
ActiveWindow.ScrollColumn = 81
ActiveWindow.ScrollColumn = 79
ActiveWindow.ScrollColumn = 78
ActiveWindow.ScrollColumn = 77
ActiveWindow.ScrollColumn = 76
ActiveWindow.ScrollColumn = 75
ActiveWindow.ScrollColumn = 74
ActiveWindow.ScrollColumn = 72
ActiveWindow.ScrollColumn = 71
ActiveWindow.ScrollColumn = 70
ActiveWindow.ScrollColumn = 69
ActiveWindow.ScrollColumn = 68
ActiveWindow.ScrollColumn = 67
ActiveWindow.ScrollColumn = 66
ActiveWindow.ScrollColumn = 65
ActiveWindow.ScrollColumn = 64
ActiveWindow.ScrollColumn = 63
ActiveWindow.ScrollColumn = 62
ActiveWindow.ScrollColumn = 60
ActiveWindow.ScrollColumn = 58
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 37
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 47
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 58
ActiveWindow.ScrollColumn = 64
ActiveWindow.ScrollColumn = 70
ActiveWindow.ScrollColumn = 77
ActiveWindow.ScrollColumn = 86
ActiveWindow.ScrollColumn = 97
ActiveWindow.ScrollColumn = 106
ActiveWindow.ScrollColumn = 116
ActiveWindow.ScrollColumn = 124
ActiveWindow.ScrollColumn = 131
ActiveWindow.ScrollColumn = 138
ActiveWindow.ScrollColumn = 144
ActiveWindow.ScrollColumn = 150
ActiveWindow.ScrollColumn = 156
ActiveWindow.ScrollColumn = 161
ActiveWindow.ScrollColumn = 167
ActiveWindow.ScrollColumn = 173
ActiveWindow.ScrollColumn = 180
ActiveWindow.ScrollColumn = 188
ActiveWindow.ScrollColumn = 195
ActiveWindow.ScrollColumn = 202
ActiveWindow.ScrollColumn = 209
ActiveWindow.ScrollColumn = 215
ActiveWindow.ScrollColumn = 221
ActiveWindow.ScrollColumn = 227
ActiveWindow.ScrollColumn = 233
ActiveWindow.ScrollColumn = 239
ActiveWindow.ScrollColumn = 245
ActiveWindow.ScrollColumn = 250
ActiveWindow.ScrollColumn = 254
ActiveWindow.ScrollColumn = 258
Range("B4:JZ11").Select
ActiveWindow.ScrollColumn = 257
ActiveWindow.ScrollColumn = 252
ActiveWindow.ScrollColumn = 242
ActiveWindow.ScrollColumn = 237
ActiveWindow.ScrollColumn = 232
ActiveWindow.ScrollColumn = 227
ActiveWindow.ScrollColumn = 221
ActiveWindow.ScrollColumn = 214
ActiveWindow.ScrollColumn = 207
ActiveWindow.ScrollColumn = 200
ActiveWindow.ScrollColumn = 182
ActiveWindow.ScrollColumn = 172
ActiveWindow.ScrollColumn = 162
ActiveWindow.ScrollColumn = 152
ActiveWindow.ScrollColumn = 144
ActiveWindow.ScrollColumn = 134
ActiveWindow.ScrollColumn = 125
ActiveWindow.ScrollColumn = 118
ActiveWindow.ScrollColumn = 111
ActiveWindow.ScrollColumn = 105
ActiveWindow.ScrollColumn = 99
ActiveWindow.ScrollColumn = 92
ActiveWindow.ScrollColumn = 86
ActiveWindow.ScrollColumn = 80
ActiveWindow.ScrollColumn = 75
ActiveWindow.ScrollColumn = 70
ActiveWindow.ScrollColumn = 65
ActiveWindow.ScrollColumn = 60
ActiveWindow.ScrollColumn = 56
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 48
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 30
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 1
Rows("4:11").Select
Selection.ClearContents
End Sub
Sub refresh()
'
' refresh Macro
' refresh values
'
' Keyboard Shortcut: Ctrl+r
'
Range("E4").Select
ActiveCell.FormulaR1C1 = "='OSC '!RC[-3]"
Range("E4").Select
Selection.AutoFill Destination:=Range("E4:JZ4"), Type:=xlFillDefault
Range("E4:JZ4").Select
Selection.AutoFill Destination:=Range("E4:JZ11"), Type:=xlFillDefault
Range("E4:JZ11").Select
ActiveWindow.ScrollColumn = 258
ActiveWindow.ScrollColumn = 253
ActiveWindow.ScrollColumn = 246
ActiveWindow.ScrollColumn = 235
ActiveWindow.ScrollColumn = 227
ActiveWindow.ScrollColumn = 218
ActiveWindow.ScrollColumn = 200
ActiveWindow.ScrollColumn = 193
ActiveWindow.ScrollColumn = 186
ActiveWindow.ScrollColumn = 180
ActiveWindow.ScrollColumn = 174
ActiveWindow.ScrollColumn = 169
ActiveWindow.ScrollColumn = 163
ActiveWindow.ScrollColumn = 157
ActiveWindow.ScrollColumn = 152
ActiveWindow.ScrollColumn = 146
ActiveWindow.ScrollColumn = 141
ActiveWindow.ScrollColumn = 135
ActiveWindow.ScrollColumn = 131
ActiveWindow.ScrollColumn = 125
ActiveWindow.ScrollColumn = 120
ActiveWindow.ScrollColumn = 114
ActiveWindow.ScrollColumn = 103
ActiveWindow.ScrollColumn = 98
ActiveWindow.ScrollColumn = 92
ActiveWindow.ScrollColumn = 86
ActiveWindow.ScrollColumn = 81
ActiveWindow.ScrollColumn = 75
ActiveWindow.ScrollColumn = 71
ActiveWindow.ScrollColumn = 66
ActiveWindow.ScrollColumn = 61
ActiveWindow.ScrollColumn = 57
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 49
ActiveWindow.ScrollColumn = 48
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 1
Range("A2").Select
End Sub