Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping through workbooks in Folder
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping through workbooks in Folder
Hi Teresa,
Ron de Bruin has some code at: http://www.rondebruin.nl/copy4.htm - range which demonstrates looping through workbooks in a specified folder and copying a given range. This code could be adapted to suit your needs. --- Regards, Norman "teresa" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping through workbooks in Folder
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) "teresa" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Looping through 2 workbooks | Excel Discussion (Misc queries) | |||
Excel VBA - Help looping through all but 2 workbooks | Excel Programming | |||
Looping through all workbooks | Excel Programming | |||
Looping through all workbooks | Excel Programming | |||
Looping through all workbooks | Excel Programming |