Looping through workbooks in Folder

T

teresa

The "List " Tab contains a list of 20 Jobs

I want to loop through the "List" Worksheet in every workbook in a folder,
copying the list to a "Consolidated" Tab.

So if "List" in Wbk1,Wbk2,Wbk3 has 20 Jobs.
Then list in "Consolidated" has 60


sub consolidate()

set path = "c/My Documents"

for each wbk in path
wbk.Sheets("List").Range("a1:a20") copy paste:
Workbooks("Consol").WorkSheets("ConList")

End Sub
 
B

Bob Phillips

Teresa,

Here is a previous post that uses FSO to get the files from a folder. Just
add the copy code into this

http://tinyurl.com/6f2wa

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top