I am copying data from workbooks Jas, Bas, Tas, & Bar, worksheet name "FCAST" into workbook Forecast test1, with worksheets have the same names, Jas, Bas, Tas, & Bar.
example: data from the 'Jas' workbook sheet' FCAST', is being copied into workbook 'Forecast test1' worksheet 'JAS'
data from the 'Bas' workbook sheet' FCAST', is being copied into workbook 'Forecast test1' worksheet 'BAS'
data from the 'Tas' workbook sheet' FCAST', is being copied into workbook 'Forecast test1' worksheet 'TAS'
data from the 'Bar' workbook sheet' FCAST', is being copied into workbook 'Forecast test1' worksheet 'Bar'
After all sheets are copied over, I want the 'Total" sheet, which is also in workbook 'Forecast test1', to consolidate the records from all 4 files into one (summing all 4 sheets)
The ranges in all sheets are the same. D6:O360.
Sub Consolidate_Files()
Dim Ary As Variant
Dim i As Long
Dim Wbk As Workbook
Set Wbk = Workbooks("Forecast test1.xlsm")
Ary = Array("Jas", "Bas", "Tas", "Bar")
For i = 0 To UBound(Ary)
Workbooks(Ary(i) & ".xlsm").Sheets("Jas").Range("D3:O369").Copy Wbk.Sheets(Ary(i)).Range("D3")
Next i
End Sub