PDA

View Full Version : Copy worksheet cells from sub folders to new workbook



TrevorJ
02-20-2013, 10:57 PM
Hi,

Please can some one help with VBA code that will work in Excel 2010 under Windows 7 to do the following.

I have a folder called Service and in that folder are 30 SubFolders. Each SubFolder contains approximately 200 workbooks all saved in a MAC format.

I need to extract Cells H6, H7, H8, H9, H10, I12 and G14 from the first worksheet (called sheet1) in all workbooks in all SubFolders.

The finished data should end up in a new workbook called Service Report.
I need the above cells to be imported to a new row where H6 goes to A2, H7 to B2, H8 to C2 etc....The headings will be Name, Address1, Address2, Contact, Phone, Product Name, Product Location from A1 to A7 respectively.

If the MAC format is a real problem I can manually open every workbook and save to an Excel format but I was dearly hoping to automate this process as well.

Any suggestions are most welcome.

Kind Regards
Trevor

NoSparks
02-22-2013, 11:05 AM
Hello TrevorJ,

Over at ExcelGuru a fellow with a similiar problem of files in folders and subfolders was directed to a function to access the files.

I would have just posted the link but don't have enough posts to do so.

As for the MAC formatting? I have no idea if there is any difference or not. 6000 workbooks, manually? Sure hope not.

Good luck
NoSparks

TrevorJ
02-22-2013, 04:33 PM
Hello NoSparks,

Thanks for the lead. I'll see if i can find it.

Thanks again
Trevor