LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Generate list from other files

Hi Everyone,

I am trying to write a sub in a workbook that takes information from
all of the workbooks in a certain folder (C:\Folder\) and combines all
of the retrieved data into one cell on the workbook that collects the
data.

For instance, every workbook in the folder has a name in cell A1 (Bob,
Jim, Hank) which I want to combine in cell Al of the collecting book
(with a space or comma or line break... I am not sure yet).

So far I have this:

With Application.FileSearch
.NewSearch
.LookIn = "C:\Folder"
.SearchSubFolders = False
.Filename = "*.xls"
.MatchTextExactly = True
.FileType = msoFileTypeExcelWorkbooks
If .Execute() 0 Then
MsgBox "There were "& .FoundFiles.Count &" file(s) found."
For i = 1 To .FoundFiles.Count
Workbooks.Open Filename:=.FoundFiles(i)
With ActiveWorkbook

*******
'take cell A1 from sheet1 and combine with the names
that are already in the collecting book to make a big list of names
*******
End With
Next i
Else
MsgBox "There were no files found"
End If
End With
End Sub


Obviously that is not working for me. I would very much appreciate a
solution to my current dilema.

Thanks in advance to anyone who can help,
Joe

 
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
How generate new list in another worksheet from existing list? NSF Excel Worksheet Functions 0 September 24th 08 01:08 PM
Generate list dvya Excel Worksheet Functions 3 July 23rd 08 07:46 PM
How to generate a list from a table Prashant Rao Excel Discussion (Misc queries) 1 November 14th 07 10:17 PM
Generate Excel files on server David Excel Programming 7 June 19th 04 03:51 AM
Macro to generate txt files using Excel Frank[_17_] Excel Programming 4 August 30th 03 03:41 AM


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

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

About Us

"It's about Microsoft Excel"