Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
assume the 3000 names are in a worksheet name filenames in a workbook name
MasterList.xls Assume the summary sheet is the first sheet in a workbook named Summary.xls Sub Process3000() Dim bk as workbook Dim cell as Range Dim rng as Range Dim rng1 as Range Dim rng3 as Range for each cell in Workbooks("MasterList.xls"). _ worksheets("Filenames").Range(A1:A3000") set bk = workBooks.open(cell.name) set rng = bk.Activesheet.Range("A1").currentRegion rng.Sort Key1:=bk.Activesheet.Range("A1") ' perform unspecified calculations ' assume a new row is added at the bottom with formula ' as an example. set rng3 = bk.Activesheet.Cells(rows.count,1).End(xlup) rng3.Resize(1,4).FormulR1C1 = "=Sum(R1C:R[-1]C)" rng3.offset(0,2).Value = "Yes" copy that line to the summation workbook set rng1 = Workbooks("Summary.xls").worksheets(1) _ cells(rows.count,1).End(xlup)(2) rng3.offset(0,1).Resize(1,4).copy rng1.offset(0,1).Pastespecial xlValues rng1.Value = cell.Value ' file name bk.close Savechanges:=False Next End sub Of course you have not defined your analysis, so I just gave an example where such code would be place. -- Regards, Tom Ogilvy "Geoffro" wrote in message oups.com... Whoops! I guess my email addy can't show up that way. It's geoffro10 at yahoo dot com Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Export / Import to / from Text file | Excel Programming | |||
Import/Export Text File Tab Delimiter | Excel Programming | |||
Using Message Box to Open/Import Text File | Excel Programming | |||
Use VBA code to open a text file with the import wizard | Excel Programming | |||
Get External Data, Import Text File, File name problem | Excel Programming |