Try this macro
Sub Test()
Const MyPath = "C:\temp\test\" 'Modify this to your path
Const TargetWorkbook = "C:\temp\test2\MyWorkbook.xlsx" 'Modify this to your target workbook
For N = 1 To 100
Workbooks.Open Filename:=MyPath & "Value_" & N, ReadOnly:=True
Total = Total + ActiveWorkbook.Sheets("Model").Range("W2")
ActiveWorkbook.Saved = True 'Prevents any 'do you wnat to save messages'
ActiveWorkbook.Close
Next N
Workbooks.Open Filename:=TargetWorkbook
ActiveWorkbook.Sheets("Sheet2").Range("O2") = Total / 100
End Sub
Open up the VBA editor by hitting ALT F11
Insert a new module by hitting Insert - Module
Paste the macro into the empty sheet
Hit ALT F11 to get back to the worksheet.
Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007/2010.
Bookmarks