Read data from closed sheets into new spreadsheet.

Lynton

New Member
Joined
Mar 13, 2011
Messages
28
I have over 900 individual invoices created by excel, all are stored in a directory d:\invoices and are named Inv10001.xlsx to inv100909.xlsx
I have a new spreadsheet called Address Book with one sheet called Address list.

I want a macro or a vba code to open each of the invoice files and copy the addresses within the files to the address list sheet, then close the invoice file. this needs to happen to all the invoices.

I want to copy the field data from

Inv(files) Address list
A13 - A1
A14 - B1
A15 - C1
A16 - D1
A17 - E1
A18 - F1
A19 - G1
A20 - H1

Hopefully this should give me all the addresses from all of the invoices in new sheet.
any help appreciated.
 
Last edited:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Are there any non-invoice files in that folder ? ( Is it safe to treat every file the same or does VBA need to check that name begins Inv...)
One of the 2 invoice numbers quoted in your post is not correct
 
Last edited:
Upvote 0
thanks for the reply'
invoices number from inv100001 to inv100909, only invoice files in that folder.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top