View Full Version : Import selected cells from multiple WB's to 1

05-09-2013, 07:35 AM
I am working on a project that will require me to extract data from over 300 workbooks, looking for a simplified solution for extracted the data and compiling onto one new file. All workbooks are located at C:\Documents and Settings\af91468\Desktop\Inspections and I need to extract data from cells B1 through H27 (large range due to merging) I actually need the data from these cells specifically though a range will also work (B1:B6 AND B22:B27) Also some of this data will be the result of a formula. I am attaching a sample of the workbook that I need to extract. Any help would be awesome

05-10-2013, 05:41 AM
Compiling How ???

sub M_snb()
for each it in split(createobject("wscript.shell").exec("cmd /c Dir C:\Documents and Settings\af91468\Desktop\Inspections\*.xls" /b").stdout.readall,vbCrLf)
with getobject(it)
thisworkbook.sheets(1).cells(1,columns.count).end(xltoleft).offset(,1).resi ze(27)=.sheets(1).range("B1:B27").value
.close 0
end with
End Sub