Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Moving multiple worksheets as separate files

I have an excel file that someone put 100 or more sheets in the file. I need
to know how I can extract all the worksheets at the same time as separate
files that I can name maybe file1.xlsx, file2,xlsx etc.

Right now I have to move or copy each sheet one at a time and that is slow.

Thank you in advance for your help.

Pauline Moreno
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Moving multiple worksheets as separate files

Sub Make_New_Books_Increment()
Dim wks As Worksheet
Dim lng As Long
lng = 1
For Each wks In ActiveWorkbook.Worksheets
wks.Copy
With ActiveWorkbook
.SaveAs FileName:="C:\folder" _
& "\File" & lng & ".xlsx"
.Close
End With
lng = lng + 1
Next wks
End Sub

Edit the path and folder to your choice.

If the current sheets have unique names you may want to save as that name
rather than File1, File2

Sub Make_New_Books_ShtName()
Dim w As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In ActiveWorkbook.Worksheets
w.Copy
With ActiveWorkbook
.SaveAs FileName:="C:\Folder" _
& "\" & w.Name & ".xlsx"
.Close
End With
Next w
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On Wed, 14 Jan 2009 15:34:13 -0800, Poli
wrote:

I have an excel file that someone put 100 or more sheets in the file. I need
to know how I can extract all the worksheets at the same time as separate
files that I can name maybe file1.xlsx, file2,xlsx etc.

Right now I have to move or copy each sheet one at a time and that is slow.

Thank you in advance for your help.

Pauline Moreno


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Moving multiple worksheets as separate files

See also this example
http://www.rondebruin.nl/copy6.htm

--

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


"Poli" wrote in message ...
I have an excel file that someone put 100 or more sheets in the file. I need
to know how I can extract all the worksheets at the same time as separate
files that I can name maybe file1.xlsx, file2,xlsx etc.

Right now I have to move or copy each sheet one at a time and that is slow.

Thank you in advance for your help.

Pauline Moreno

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Moving multiple worksheets as separate files

Thank you so much for your help. Everything worked out just fine.

Poli

"Gord Dibben" wrote:

Sub Make_New_Books_Increment()
Dim wks As Worksheet
Dim lng As Long
lng = 1
For Each wks In ActiveWorkbook.Worksheets
wks.Copy
With ActiveWorkbook
.SaveAs FileName:="C:\folder" _
& "\File" & lng & ".xlsx"
.Close
End With
lng = lng + 1
Next wks
End Sub

Edit the path and folder to your choice.

If the current sheets have unique names you may want to save as that name
rather than File1, File2

Sub Make_New_Books_ShtName()
Dim w As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In ActiveWorkbook.Worksheets
w.Copy
With ActiveWorkbook
.SaveAs FileName:="C:\Folder" _
& "\" & w.Name & ".xlsx"
.Close
End With
Next w
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On Wed, 14 Jan 2009 15:34:13 -0800, Poli
wrote:

I have an excel file that someone put 100 or more sheets in the file. I need
to know how I can extract all the worksheets at the same time as separate
files that I can name maybe file1.xlsx, file2,xlsx etc.

Right now I have to move or copy each sheet one at a time and that is slow.

Thank you in advance for your help.

Pauline Moreno



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Moving multiple worksheets as separate files

Good to hear

Thanks for the feedback

Gord

On Tue, 20 Jan 2009 15:14:00 -0800, Poli
wrote:

Thank you so much for your help. Everything worked out just fine.

Poli

"Gord Dibben" wrote:

Sub Make_New_Books_Increment()
Dim wks As Worksheet
Dim lng As Long
lng = 1
For Each wks In ActiveWorkbook.Worksheets
wks.Copy
With ActiveWorkbook
.SaveAs FileName:="C:\folder" _
& "\File" & lng & ".xlsx"
.Close
End With
lng = lng + 1
Next wks
End Sub

Edit the path and folder to your choice.

If the current sheets have unique names you may want to save as that name
rather than File1, File2

Sub Make_New_Books_ShtName()
Dim w As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In ActiveWorkbook.Worksheets
w.Copy
With ActiveWorkbook
.SaveAs FileName:="C:\Folder" _
& "\" & w.Name & ".xlsx"
.Close
End With
Next w
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On Wed, 14 Jan 2009 15:34:13 -0800, Poli
wrote:

I have an excel file that someone put 100 or more sheets in the file. I need
to know how I can extract all the worksheets at the same time as separate
files that I can name maybe file1.xlsx, file2,xlsx etc.

Right now I have to move or copy each sheet one at a time and that is slow.

Thank you in advance for your help.

Pauline Moreno




Reply
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 to open multiple excel files as separate tasks on the taskbar? Bread Setting up and Configuration of Excel 6 October 12th 08 12:39 PM
Macro help - Moving 2 cells from 100 separate files into new folder Steven Excel Discussion (Misc queries) 7 July 10th 07 07:47 PM
Merge worksheets from separate files into one workbook. dagriffin Excel Discussion (Misc queries) 6 April 20th 06 06:56 PM
How do I separate worksheets in a workbook into individual files? jmd Excel Worksheet Functions 3 December 13th 05 09:18 PM
separate worksheet into multiple worksheets by grouping BPM001 Excel Worksheet Functions 1 November 5th 05 02:48 AM


All times are GMT +1. The time now is 08:49 AM.

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

About Us

"It's about Microsoft Excel"