Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looping through 2 workbooks Pierre Excel Discussion (Misc queries) 3 March 7th 08 04:00 PM
Excel VBA - Help looping through all but 2 workbooks waveracerr[_19_] Excel Programming 1 April 1st 04 01:50 PM
Looping through all workbooks Mervyn Thomas[_3_] Excel Programming 0 July 31st 03 05:50 PM
Looping through all workbooks Mervyn Thomas[_3_] Excel Programming 0 July 29th 03 02:59 PM
Looping through all workbooks Abdul Salam[_3_] Excel Programming 1 July 29th 03 02:59 PM


All times are GMT +1. The time now is 06:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"