Put this code into a standard codemodule in your master workbook, and name one sheet of that workbook "Summary", and store that in the folder with the ESS workbooks - I have assumed they are all named ESS- somthing....
Also, create a subfolder named "Archive"
Option Explicit
Sub LoopThroughFiles()
Dim i As Integer
Dim strPath As String
Dim wkbWB As Workbook
Dim shtSource As Worksheet
Dim shtDest As Worksheet
Dim strAdd1 As String
Dim strAdd2 As String
Dim v As Variant
Dim lngD As Long
Dim rngC As Range
Dim intOff As Integer
Dim strWorkFile As String
Set shtDest = ThisWorkbook.Sheets("Summary")
strPath = ThisWorkbook.Path & "\"
strAdd1 = "DG2,N11,N12,N19,N13,AO7,AO8,AO9,AO10,AO11,AO12,AO12,AO13,AO14,BO8,BO11,BO14"
strAdd2 = "U37,AD37,AH37,DH37,C37,O37"
strWorkFile = Dir(strPath & "ESS*")
While strWorkFile <> ""
Set wkbWB = Workbooks.Open(strPath & strWorkFile)
Set shtSource = wkbWB.Worksheets("ESS FRC REQUEST")
Set rngC = shtSource.Range("U37")
While rngC.Value <> ""
lngD = shtDest.Cells(shtDest.Rows.Count, "A").End(xlUp)
v = Split(strAdd1, ",")
For i = LBound(v) To UBound(v)
shtDest.Cells(lngD, i + 1).Value = shtSource.Cells(v(i)).Value
Next i
intOff = UBound(v) + 1
v = Split(strAdd2, ",")
For i = LBound(v) To UBound(v)
shtDest.Cells(lngD, i + intOff + 1).Value = shtSource.Cells(rngC.Row, Range(v(i)).Column).Value
Next i
Set rngC = rngC(2)
Wend
wkbWB.SaveCopyAs strPath & "Archive\" & wkbWB.Name
wkbWB False
Kill strPath & strWorkFile
strWorkFile = Dir()
Wend
End Sub
Bookmarks