Sub ScanData()
'
' Macro1 Macro
' Macro recorded 21/05/2003 by Stephen Hoadley
'
'
Sheets("Files").Select
Range("a1").Select
r = Range("A65536").End(xlUp).Offset(0, 0).Row
For counter = 1 To r
y = ActiveCell
Workbooks.Open Filename:=y, UpdateLinks:=0
Sheets("FREETASK").Select
Range("A2").Select
x = ActiveWorkbook.Name
Range("A1").Select
Windows("Index Merge Stock Take.xls").Activate
Sheets.Add
ActiveSheet.Name = x
Windows(x).Activate
Cells.Select
Selection.Copy
Windows("Index Merge Stock Take.xls").Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
'ActiveSheet.Paste
Range("A1").Select
Columns("A:A").Select
Selection.Font.Bold = False
With Selection
.HorizontalAlignment = xlLeft
End With
Range("A1").Select
Windows(x).Activate
Range("A1").Select
Application.CutCopyMode = False
ActiveWorkbook.Close
Range("B65536").End(xlUp).Offset(1, -1).Select
ActiveCell.Offset(-1, 8).Range("A1").Select
a = ActiveCell.Address
'Sheets("Headings").Select
'Range("G4:I4").Select
'Selection.Copy
'Sheets(x).Select
'Range("G1").Select
'ActiveSheet.Paste
'If a = "$I$1" Then a = "$I$2"
'Selection.AutoFill Destination:=Range("G1", a), Type:=xlFillDefault
'Application.CutCopyMode = False
Range("a1").Select
Sheets("Files").Select
ActiveCell.Offset(1, 0).Range("A1").Select
Next counter
Sheets.Add
ActiveSheet.Name = "Merge"
Sheets("Headings").Select
Range("F8").Select
End Sub