Back to Top

How to split the sheets of a workbook into multiple workbooks of excel

splitting of  the excel document sheets  into multiple workbooks of excel :---



open the Excel file which consist multiple no of the sheets that we want to split into multiple excel books :

eg:----





Now press ( ALT and F11 ) key together and  than it will let you proceed to the next excel file




Go to Insert option in the Menu Bar and than go to Module option under Insert Menu.
                                       


copy paste the following code and than click on the run button:


Sub Splitbook()
'Updateby20140612
Dim xPath As String
xPath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each xWs In ThisWorkbook.Sheets
    xWs.Copy
    Application.ActiveWorkbook.SaveAs Filename:=xPath & "\" & xWs.Name & ".xls"
    Application.ActiveWorkbook.Close False
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub







Now you will have all the Excels in the split form with the Names in the same path or place, where  your actual excel exist.

0comments

Post a Comment