View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Otto Moehrbach[_2_] Otto Moehrbach[_2_] is offline
external usenet poster
 
Posts: 1,071
Default Creating multiple workbooks

This macro will do what you want. I chose "C:\The Folder" as the path.
Otto
Sub CreateWorkbooks()
Dim ThePath As String
Dim rColA As Range
Dim i As Range
Application.ScreenUpdating = False
ThePath = "C:\The Folder\"
Set rColA = Range("A2", Range("A" & Rows.Count).End(xlUp))
For Each i In rColA
Workbooks.Add
ActiveWorkbook.SaveAs Filename:=ThePath & i.Value & ".xls"
ActiveWorkbook.Close
Next i
Application.ScreenUpdating = True
End Sub

"Poorvi" wrote in message
...
I want to name each file after each cost center. So what I mean is if I
have
data subtotalled by Cost center as follows:

Cost Center Asset No. Asset Value Tag No. etc.


Can I create one workbook for each cost center, named after the cost
center.


"Otto Moehrbach" wrote:

Yes and Yes. What is a "naming sequence" and to what do you want it
assigned? HTH Otto
"Poorvi" wrote in message
...
Is there anyway I can use information on an excel worksheet to create
multiple files? I have data on say 'Tab1'. I have subtotalled data by
cost
centers. Can I get a new file created in excel for each cost center ?
Can
I
have a naming sequence assigned to this?