How to Split Excel Sheet into Multiple Files (3 Quick Methods)

In an Excel workbook, we may have several worksheets at times. Suppose, we only want to work with a particular worksheet from our workbook. So, we may need to split the excel sheet into multiple separate files for the convenience of our work. In this tutorial, we will explain different methods to split excel worksheets of a workbook into multiple files.


Download Practice Workbook

You can download the practice workbook from here.


3 Quick Methods to Split Excel Sheet into Multiple Files

In this article, we will show you 3 quick methods to separate the excel sheet into multiple files. First, we will show you 2 manual ways to split sheets. Then, we will split excel sheets using VBA code.


1. Manual Ways to Split Excel Sheet into Multiple Files

1.1 Using Copy and Paste Options

In the following dataset, we have sales data of 5 people for 4 years in 4 different worksheets. Suppose, we want to split each excel sheet of the workbook into separate files. We will use simple Copy and Paste options to do this.

Using Copy and Paste Options

So, let’s see the steps to perform this action.

STEPS:

  • To begin with, click on the sheet 2019.
  • In addition, click on the triangular select all button on the top left corner or press Ctrl + A to select all the worksheets.
  • Furthermore, click on the Copy from the Home tab or press Ctrl + C to copy the entire selected sheet.

Using Copy and Paste Options

  • Next, open a new worksheet.
  • Then, select cell A1 or the entire worksheet by clicking on the triangular select all button.
  • After that, press Ctrl + V to paste the copied data.
  • Lastly, we get the result like the following image. So, from the above actions, we get the first sheet of our excel workbook separated into an individual excel file.

NOTE:

To split the other 3 excel files we have to use Copy and Paste again and again. So, this method is not only inefficient but also time-consuming.

Read More: How to Split Excel Sheet into Multiple Sheets Based on Column Value


1.2 Apply ‘Move or Copy’ Feature

In this method, we will split the excel sheet into multiple files using the ‘Move or Copy’ feature. To illustrate this method we will continue with our previous dataset. Follow the below steps to execute this method.

STEPS:

  • First, right-click on the sheet named 2019.
  • Next, select the option ‘Move or Copy’.

Apply ‘Move or Copy’ Feature

  • The above command will open a new pop-up window named ‘Move or Copy’.
  • Then, select the option (new book) from the To book drop-down list.
  • After that, check the option Create a Copy and click on OK.

Apply ‘Move or Copy’ Feature

  • Finally, a copy of the worksheet 2019 will open in a new worksheet. As a result, we get the sheets separated from the original workbook.

NOTE:

Like the previous method, this method is also tedious and time-consuming. Because with this method we can move or copy only a single worksheet at a time. If we want to split multiple worksheets with a single move this method will not work.

Read More: Excel VBA: Split Sheet into Multiple Sheets Based on Rows


2. Apply VBA Code to Split Excel Sheet into Multiple Files

In this section of the tutorial, we will provide you with some VBA codes to split the excel sheet into multiple files. We can quickly split all worksheets in a workbook into separate files using VBA code and save them in any predefined folder. To use VBA code to split excel sheets we have to ensure two things:

  • First, make a folder in which we will store our output files.
  • Then, save the main excel file in the newly created folder.

2.1 Into Multiple Excel Files

This method will show you how to split excel sheets into multiple excel files. Go through the below steps to perform this method.

STEPS:

  • Firstly, save our main excel file ‘Split Excel Sheet.xlsx’ in the folder where we want to store the output results.

Into Multiple Excel Files

  • Secondly, open the original workbook.

Into Multiple Excel Files

  • Thirdly, go to the Developer Select the option ‘Visual Basic’ from the ribbon.

Into Multiple Excel Files

  • This will open the VBA We can also press Alt + F11 to open that editor.
  • Next, right-click on any object from the section ‘Microsoft Excel Objects’.
  • Then, select the option Insert and click on Module.

Into Multiple Excel Files

  • Furthermore, the above command will open a blank VBA code window.
  • After that, type the following code in the blank code window:
Sub Split_Sheet_into_ExcelFiles()
Dim FilePath As String
FilePath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each Sheet In ThisWorkbook.Sheets
Sheet.Copy
Application.ActiveWorkbook.SaveAs Filename:=FilePath & "\" & Sheet.Name & ".xlsx"
Application.ActiveWorkbook.Close False
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
  • Now, click on the Run button or press the F5 key to run the code.

  • Lastly, the above actions split all the sheets of our original workbook into individual excel files. We get the newly separated excel files in the same folder where we placed our original workbook.

Read More: How to Split Sheets into Separate Workbooks in Excel (4 Methods)


2.2  Into Multiple PDF Files

In this method, we will split excel worksheets into multiple PDF files. We will use the same dataset for this method that we used in the previous method. This is almost similar to the previous method. The only difference is that the output of this method will be in PDF format whereas in the previous method the output was in Excel format.

Into Multiple PDF Files

Let’s see the steps to do this.

STEPS:

  • In the beginning, go to the Developer tab.
  • Next, from the ribbon select the option ‘Visual Basic’.

Into Multiple PDF Files

  • The VBA editor will open as a result of this. We can also open the editor by pressing Alt + F11.
  • Then, right-click any object in the ‘Microsoft Excel Objects‘ area.
  • Next, select Insert and click on the option Module.

Into Multiple PDF Files

  • Now, a blank VBA code window will appear.
  • Furthermore, type the following code in that code window:
Sub Split_Sheet_into_PDF()
Dim FilePath As String
FilePath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each Sheet In ThisWorkbook.Sheets
Sheet.Copy
Application.ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, Filename:=FilePath & "\" & Sheet.Name & ".xlsx"
Application.ActiveWorkbook.Close False
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
  • To run the code click on the Run button or press the F5 key.

  • In the end, we get results like the following image. We can see the excel sheets separated in PDF format in the folder where we place our original file.

Read More: Split Excel Sheet into Multiple Sheets Based on Rows


Similar Readings


3. Split Worksheets Containing Specific Word or Phrase with Excel VBA

To illustrate this method we are continuing with our previous dataset for this method also. We always do not have the need to split all the sheets from an excel workbook. For instance, we may have the need to split worksheets into multiple files from our original workbook that contains specific words or phrases. From the following dataset, we will separate the sheets that only contain text 22 in their name. To do this we will apply a simple VBA code.

Split Worksheets Containing Specific Word or Phrase with Excel VBA

So, let’s see the steps to do this method.

STEPS:

  • To begin with, go to the Developer Select the option ‘Visual Basic’.

Split Worksheets Containing Specific Word or Phrase with Excel VBA

  • As a result, the VBA editor will appear. We can also access the editor by pressing Alt + F11.
  • In addition, in the ‘Microsoft Excel Objects‘ box, right-click on any object.
  • Furthermore, select Insert and click on the option Module.

Split Worksheets Containing Specific Word or Phrase with Excel VBA

  • So, a new blank VBA code window will appear.
  • Then, insert the following code in that code window:
Sub Split_Sheet_Specific_Word()
Dim FilePath As String
Dim Find As String
Find = "22"
FilePath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each Sheet In ThisWorkbook.Sheets
If InStr(1, Sheet.Name, Find, vbBinaryCompare) <> 0 Then
Sheet.Copy
Application.ActiveWorkbook.SaveAs _
Filename:=FilePath & "\" & Sheet.Name & ".xlsx"
Application.ActiveWorkbook.Close False
End If
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
  • After that, click on the Run button or press the F5 key to run the code.

  • Finally, we can see the result in the following image. We get the sheet that has 22 in its name in the folder containing our original file.

Read More: How to Split Excel Sheet into Multiple Worksheets (3 Methods)


Conclusion

In conclusion, this tutorial shows different methods to split sheets into excel files. To put your skills into practice, use the sample worksheet provided in this article. Please feel free to comment in the box below if you have any questions. Our team will try to respond to your message as quickly as possible. In the future, keep an eye out for more innovative Microsoft Excel solutions.


Related Articles

Mukesh Dipto

Mukesh Dipto

Hi there! I am Mukesh Dipto. I graduated with a bachelor's degree in engineering. Currently, I am working as a technical content writer in ExcelDemy. You will find all my articles on Microsoft Excel on this site. Outside of the workplace, my hobbies and interests include sports and meeting new people. I also enjoy sports. My favorite sports are football (to watch and play) and Badminton (play).

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo