View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Need to merge 1500 files into 1!!!

Is this going through the folder I selected in alphabetical order?
Yes

You can use this for example to fill in the filename also
<basebook.Worksheets(1).Cells(rnum, 4) = mybook.Name
4 is the column, if you copy a range more then 3 columns width then change this

Set mybook = Workbooks.Open(FNames)
Set sourceRange = mybook.Worksheets(1).Range("a1:c3")
a = sourceRange.Rows.Count
Set destrange = basebook.Worksheets(1).Cells(rnum, 1)
sourceRange.Copy destrange
basebook.Worksheets(1).Cells(rnum, 4) = mybook.Name


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"rglasunow " wrote in message ...
Thank you so much for your help. This worked great. You just saved me
from Ctrl+C & Ctrl+V 1500 times!!!

I just have one more question.

Under this command - Do Until FName = ""

Is this going through the folder I selected in alphabetical order?
Thank you,
Ryan


---
Message posted from http://www.ExcelForum.com/