Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to create new sheets for each row in Excel?

Author Siluvia Last modified

In data management or reporting tasks, you may sometimes need to separate each record from a table into its own worksheet. For example, if you maintain a list of student details in Excel, with each row representing information for a different student, you might wish to generate a separate sheet for every student, each containing their specific data. Alternatively, you may simply want to split every row—regardless of its contents—so that each is placed in a new worksheet on its own. Manually creating and copying data into new sheets can be time-consuming and error-prone, especially if you are working with a large dataset. Automating this process saves significant time and reduces the risk of mistakes. This guide walks you through two practical solutions for creating new sheets for each row in Excel and explains the pros and cons of each method to help you select the best approach for your scenario.

Create new sheets for each row with VBA code
Create new sheets for each row with the Split Data utility of Kutools for Excel


Create new sheets for each row with VBA code

Using VBA (Visual Basic for Applications) is an effective way to automate Excel tasks that are otherwise tedious and repetitive. With VBA, you can quickly create new worksheets for each row in your data, either by grouping rows based on a column (such as a student name), or by creating one sheet for every single row regardless of content. This approach is ideal for users comfortable with the VBA editor and who prefer a highly customizable solution. However, it does require editing and running code, so it may not suit users who do not have experience with VBA or lack permission to run macros in their environment.

1. Press "Alt" + "F11" to open the Microsoft Visual Basic for Applications window, which allows you to access VBA code for automating Excel operations.

2. In the Microsoft Visual Basic for Applications window, click Insert > Module to add a new code module. Then copy and paste the following code into the Module window.

VBA code: create new sheet for each row based on column

Sub parse_data()
'Update by Extendoffice 2018/3/2
    Dim xRCount As Long
    Dim xSht As Worksheet
    Dim xNSht As Worksheet
    Dim I As Long
    Dim xTRrow As Integer
    Dim xCol As New Collection
    Dim xTitle As String
    Dim xSUpdate As Boolean
    Set xSht = ActiveSheet
    On Error Resume Next
    xRCount = xSht.Cells(xSht.Rows.Count, 1).End(xlUp).Row
    xTitle = "A1:C1"
    xTRrow = xSht.Range(xTitle).Cells(1).Row
    For I = 2 To xRCount
        Call xCol.Add(xSht.Cells(I, 1).Text, xSht.Cells(I, 1).Text)
    Next
    xSUpdate = Application.ScreenUpdating
    Application.ScreenUpdating = False
    For I = 1 To xCol.Count
        Call xSht.Range(xTitle).AutoFilter(1, CStr(xCol.Item(I)))
        Set xNSht = Nothing
        Set xNSht = Worksheets(CStr(xCol.Item(I)))
        If xNSht Is Nothing Then
            Set xNSht = Worksheets.Add(, Sheets(Sheets.Count))
            xNSht.Name = CStr(xCol.Item(I))
        Else
            xNSht.Move , Sheets(Sheets.Count)
        End If
        xSht.Range("A" & xTRrow & ":A" & xRCount).EntireRow.Copy xNSht.Range("A1")
        xNSht.Columns.AutoFit
    Next
    xSht.AutoFilterMode = False
    xSht.Activate
    Application.ScreenUpdating = xSUpdate
End Sub

Parameter explanation and usage tips:

  • A1:C1 is the header range for your data table. Adjust this reference to match your actual data header area as needed.
  • The code collects unique values from the specified column (by default, column A). Each unique value gets its own worksheet with the corresponding rows.
  • If your table is wider or starts from a different row, update xTitle and cell references accordingly.
  • If your worksheet contains formulas that reference other sheets, check references after splitting.

3. Press the F5 key or click Run to execute the code. New worksheets will be created after all existing sheets in the current workbook, each named according to the unique column value chosen. See the screenshot below for a sample result:

A screenshot showing a new workbook with sheets created from each row based on column value

If you wish to simply split every row into its own worksheet, regardless of column content, you can use the following alternative VBA code. This eliminates the need to specify a column condition.

VBA code: Directly create new sheet for each row

Sub RowToSheet()
	Dim xRow As Long
	Dim I As Long
	With ActiveSheet
		xRow = .Range("A" & Rows.Count).End(xlUp).Row
		For I = 1 To xRow
			Worksheets.Add(, Sheets(Sheets.Count)).Name = "Row " & I
			.Rows(I).Copy Sheets("Row " & I).Range("A1")
		Next I
	End With
End Sub

After running this code in the module, each row from the active worksheet—including the header row—will be copied to a newly created worksheet. Note that the header row is also duplicated; if you wish to avoid this, you may need to manually delete or adjust the output sheets afterwards.

Troubleshooting and practical tips:
- If you encounter an error such as "Subscript out of range," ensure that your sheet names do not contain invalid characters or duplicate names.
- Large datasets may result in a large number of sheets, which can slow down Excel or make navigation cumbersome. Consider whether splitting by row is necessary for extremely large tables.
- Always keep a backup of your data before running VBA code to prevent unintentional data loss.

Advantages: Free; highly customizable.
Disadvantages: Requires VBA/macros enabled and some familiarity with VBA editor; potential for code errors with complex or unusual data.
Suitable for: Users needing scripting flexibility, and for one-time or irregular tasks.


Create new sheets for each row with the Split Data utility of Kutools for Excel

If you prefer a straightforward, user-friendly approach without writing code, the Split Data utility of Kutools for Excel is highly recommended. This function helps you split data into new worksheets quickly with just a few clicks, significantly simplifying the worksheet management process. Kutools is especially useful for users who regularly handle large, complex tables or who prefer graphical interfaces over manual coding. Note that Kutools is an Excel add-in and must be installed in advance.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Select the table containing the data you want to split into individual worksheets. Then, click the Kutools Plus tab and select Split Data. Refer to the screenshot below for clarity:

A screenshot of the 'Split Data' option under the Kutools Plus tab in Excel

2. In the Split Data into Multiple Worksheets dialog box, choose the appropriate settings based on your splitting needs.

A. To create new sheets based on column values:

1). Select the Specific column option, and then specify the column you want to use as a basis for splitting—typically a unique identifier such as student name or ID.
2). If you want each sheet to be named after its value in that column, choose Values of Column from the Rules drop-down menu.
3). Click OK to execute the split. See the screenshot below:

A screenshot of the 'Split Data into Multiple Worksheets' dialog box with settings for splitting by column value

B. To directly create new sheets for each row:

1). Select the Fixed rows option, and enter 1 in the box to indicate that each worksheet should contain only one row of data.
2). For the Rules dropdown, select Row Numbers to label each sheet by its row index.
3). Click OK to begin the splitting process. Refer to the screenshot below:

A screenshot of the 'Split Data into Multiple Worksheets' dialog box with settings for splitting by row

After executing, a new workbook will be generated containing all the new worksheets—each populated according to the settings you selected.

Creating new sheets for each row based on column values:

A screenshot showing a new workbook with sheets created from each row based on column value

Creating new sheet for each row without considering column values:

A screenshot showing a new workbook with sheets created from each row without considering the column value

Precautions and practical tips:
- Before using the Split Data utility, ensure there are no blank rows in your table, as these can result in empty sheets.
- Review sheet naming conventions to avoid duplicate or invalid worksheet names; Kutools will automatically adjust if a name conflict occurs.
- The process can generate a large number of worksheets if your table is very large, so consider this before proceeding.

Advantages: Easy to use with no coding required; suitable for batch processing and frequent tasks.
Disadvantages: Requires Kutools add-in to be installed.
Suitable for: All levels of Excel users, especially those dealing with repetitive data segmentation.

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now


Demo: Create new sheets for each row with the Split Data utility of Kutools for Excel

 
Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy permanently free AI features! Download Now!

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in