Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / May 2008

Tip: Looking for answers? Try searching our database.

Creating multiple workbooks

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Poorvi - 09 May 2008 19:04 GMT
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?
Otto Moehrbach - 09 May 2008 20:26 GMT
Yes and Yes.  What is a "naming sequence" and to what do you want it
assigned?  HTH  Otto
> 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?
Poorvi - 16 May 2008 20:21 GMT
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.

> Yes and Yes.  What is a "naming sequence" and to what do you want it
> assigned?  HTH  Otto
[quoted text clipped - 3 lines]
> > I
> > have a naming sequence assigned to this?
Otto Moehrbach - 18 May 2008 03:25 GMT
Can I assume that you want a new file created and named for each entry in
Column A?  Otto
> I want to name each file after each cost center. So what I mean is if I
> have
[quoted text clipped - 14 lines]
>> > I
>> > have a naming sequence assigned to this?
Otto Moehrbach - 18 May 2008 03:40 GMT
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

> I want to name each file after each cost center. So what I mean is if I
> have
[quoted text clipped - 14 lines]
>> > I
>> > have a naming sequence assigned to this?
Ron de Bruin - 09 May 2008 20:44 GMT
See
http://www.rondebruin.nl/copy5.htm#workbook

Signature

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm

> 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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.