Skip to main content

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

Excel: How to split delimited text to rows

Author Sun Last modified

When working with data in Excel, you may encounter cells containing multiple pieces of information separated by delimiters like commas, spaces, or semicolons. Splitting this text into separate rows can be essential for better data analysis and organization. Fortunately, Excel provides various methods to accomplish this task efficiently. Here is a step-by-step guide on how to split delimited text into rows.
split delimited text to rows

Split delimited text to rows by using VBA

Split delimited text to rows by Kutools for Excel

Split delimited text to rows by POWER QUERY


Split delimited text to rows by using VBA

Here is a VBA code that can quickly split delimited text to rows.

1. Press "Alt + F11" keys to enable the "Microsoft Visual Basic for Applications" window.

2. Click "Insert" > "Module" to create a new blank module.

3. Copy and paste below code to the blank module.

VBA: Split delimited text to rows

Public Sub SplitTextInCellsToRows()
'UpdatebyExtendoffice20220622
    Dim xSRg, xIptRg, xCrRg, xRg As Range
    Dim xSplitChar As String
    Dim xArr As Variant
    Dim xFNum, xFFNum, xRow, xColumn, xNum As Integer
    Dim xWSh As Worksheet
    Set xSRg = Application.InputBox("Select a range:", "Kutools for Excel", , , , , , 8)
    If xSRg Is Nothing Then Exit Sub
    xSplitChar = Application.InputBox("Type delimiter:", "Kutools for Excel", , , , , , 2)
    If xSplitChar = "" Then Exit Sub

    Application.ScreenUpdating = False
    xRow = xSRg.Row
    xColumn = xSRg.Column
    Set xWSh = xSRg.Worksheet
    For xFNum = xSRg.Rows.Count To 1 Step -1
        
        Set xRg = xWSh.Cells.Item(xRow + xFNum - 1, xColumn)
        Debug.Print xRg.Address
        xArr = Split(xRg, xSplitChar)
        For xFFNum = LBound(xArr) To UBound(xArr)
            xRg.EntireRow.Copy
            xRg.Offset(1, 0).EntireRow.Insert Shift:=xlShiftDown
            xRg.Worksheet.Cells(xRow + xFNum, xColumn) = xArr(xFFNum)
        Next
        xRg.EntireRow.Delete
    Next
    Application.CutCopyMode = False
    Application.ScreenUpdating = True
End Sub

4. Press F5 key to activate the code, a dialog pops out for you to select the column that excludes the header that contains the delimited text needed to be split into rows. Click OK.
vba code to select the data range

5. Then the second dialog pops to enter the delimiter you use. Here types comma (,). Click OK.
enter the delimiter to split based on

Now the delimited texts have been split into rows and other related columns have been repeated.
the delimited texts are split into rows and other related columns have been repeated

note button  The VBA will change the original data, you should better save a copy of it before.


Split delimited text to rows by Kutools for Excel

Using Kutools for Excel's "Split Data to Rows" feature can significantly simplify the process of splitting delimited text into multiple rows. With just a few clicks, you can split text separated by specific delimiters, such as commas, semicolons, or spaces, into individual rows.

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...

After installing Kutools for Excel, please do as this:

1. Click "Kutools" > "Merge & Split" > "Split Data to Rows", see screenshot:
find and click Split Data to Rows feature

2. In the "Split Data to Rows" dialog box, specify the following operations:

  1. Select the column data that you want to split from the "Range (single column)" text box;
  2. Then, choose the delimiter which separates your data, here, I will choose "Other" and type comma and a space (, ) into the textbox;
  3. At last, click OK button.
    specify the options in the dialog box

Now, the delimited texts have been converted into multiple rows based on the specific separator, see screenshot:
get the result by kutools


Split delimited text to rows by using Power Query

If you are in Excel 2013 or later versions, the Power Query will be a good choice for solving this job.

1. Select the data range, to click "Data" > "From Table/Range".
click Data > From Table/Range

2. In the popping "Create Table" dialog, check "My table has headers" as you need, and click OK.
check My table has headers

Then the "Power Query Editor" window is displayed, and the data has been shown in it.
the data is shown in the Power Query Editor window

3. Click on the column that you want to split the delimited texts to rows, and click "Transform" tab > "Split Column" > "By Delimiter".
click Transform tab > Split Column > By Delimiter

Or you also can select the column and right-click on the column header to choose this feature in the context menu.
 right-click on the column header to choose By Delimiter

4. In the "Split Column by Delimiter" window, choose the delimiter as you need from the "Select or enter delimiter" section, then choose "Each occurrence of the delimiter" option, and then expand "Advanced options" section to choose "Rows" option. Click OK.
specify options in the dialog box

Now the delimited texts have been split into rows.
the delimited texts have been split into rows

5. Then close the window, a dialog pops out, click Keep button.
click Keep button in the dialog box

Then a new sheet will be created with the table.
a new sheet will be created with the table

By using one of these methods, you can efficiently split delimited text into rows and make your Excel data more manageable and actionable. If you're interested in exploring more Excel tips and tricks, our website offers thousands of tutorials.


Other Operations (Articles)

How to alternate row color based on group in Excel?
In Excel, to color every other row may be easier for most of us, but, have you ever tried to color the rows alternately based on a column value changes – Column A as following screenshot shown, in this article, I will talk about how to alternate row color based on group in Excel.

How To Reduce Excel File Size?
Sometimes, it will take minutes to open or save if the Excel file is too large. For solving this problem, here in this tutorial, it tells you how to reduce the Excel file size by removing the contents or formats which are unnecessary or never used.

Excel: How To Create Or Insert A Bookmark
Have you ever imagined creating or inserting a bookmark for quickly jumping to a specific data range while there is a lot of data in a worksheet or a workbook?

How to apply shading to odd or even (alternative) rows/columns in Excel?
While designing a worksheet, many people tend to apply shading to odd or even (alternative) rows or columns in order to make the worksheet more visual. This article will show you two methods to apply shading to odd or even rows/columns in Excel.

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