Option Explicit
Sub CollectExcelSheets()
Dim f1, fc As Object 'filesystem objects for looping through selected folders files.
Dim fd As FileDialog
Dim s, wksheet As Worksheet
Dim w As Workbook
Dim wb As Workbook
Dim wbname As String
Dim currRow As Long
Dim i, j, k As Integer
Dim numfiles As Long
Dim initialpath As String
On Error Resume Next
currRow = 4
Set w = ActiveWorkbook
initialpath = w.Path & "\"
Set s = w.Sheets("Summary")
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
fd.AllowMultiSelect = False
fd.InitialFileName = initialpath
fd.Title = "Select Excel File Folder"
fd.Show
Set fc = CreateObject("Scripting.FileSystemObject").GetFolder(fd.SelectedItems(1)).Files
For Each f1 In fc
If Right(f1.Name, 4) = ".xls" Then
On Error Resume Next
Set wb = Workbooks.Open(f1.Path)
'get data
Set wksheet = wb.Worksheets("Summary - with turnover")
s.Cells(currRow, 1).Value = wb.Worksheets("Test Records").Range("F2").Value
s.Cells(currRow, 2).Value = wksheet.Cells(128, 3).Value
s.Cells(currRow, 3).Value = wksheet.Cells(127, 3).Value
s.Cells(currRow, 4).Value = wksheet.Cells(35, 12).Value
'scenario Baseline
For i = 1 To 5
s.Cells(currRow, i + 4).Value = wksheet.Cells(66, i + 2).Value
Next
For i = 1 To 5
s.Cells(currRow, i + 10).Value = wksheet.Cells(68, i + 2).Value
Next
For i = 2 To 5
s.Cells(currRow, i + 16).Value = (wksheet.Cells(70, i + 2).Value - wksheet.Cells(70, i + 1).Value)
Next
s.Cells(currRow, 17).Value = (wksheet.Cells(70, 3).Value - wksheet.Cells(35, 12).Value)
'scenario 1A
For k = 1 To 5
s.Cells(currRow, k + 22).Value = wksheet.Cells(73, k + 2).Value
Next
For k = 1 To 5
s.Cells(currRow, k + 28).Value = wksheet.Cells(75, k + 2).Value
Next
For k = 2 To 5
s.Cells(currRow, k + 34).Value = (wksheet.Cells(77, k + 2).Value - wksheet.Cells(77, k + 1).Value)
Next
s.Cells(currRow, 35).Value = (wksheet.Cells(77, 3).Value - wksheet.Cells(35, 12).Value)
'get 2011 data
s.Cells(currRow, 41).Value = wksheet.Cells(35, 6).Value
s.Cells(currRow, 42).Value = wksheet.Cells(35, 9).Value
s.Cells(currRow, 43).Value = wksheet.Cells(35, 12).Value - wksheet.Cells(35, 4).Value
wb.Close (vbNo)
Set wb = Nothing
currRow = currRow + 1
End If
Next
Set fc = Nothing
Set fd = Nothing
End Sub