Excel: How to split delimited text to rows
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 by using VBA
Split delimited text to rows by Kutools for Excel
Split delimited text to rows by POWER QUERY
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.
5. Then the second dialog pops to enter the delimiter you use. Here types comma (,). Click OK.
Now the delimited texts have been split into rows and other related columns have been repeated.
The VBA will change the original data, you should better save a copy of it before.
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.
After installing Kutools for Excel, please do as this:
1. Click "Kutools" > "Merge & Split" > "Split Data to Rows", see screenshot:
2. In the "Split Data to Rows" dialog box, specify the following operations:
- Select the column data that you want to split from the "Range (single column)" text box;
- Then, choose the delimiter which separates your data, here, I will choose "Other" and type comma and a space (, ) into the textbox;
- At last, click OK button.
Now, the delimited texts have been converted into multiple rows based on the specific separator, see screenshot:
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".
2. In the popping "Create Table" dialog, check "My table has headers" as you need, and click OK.
Then the "Power Query Editor" window is displayed, and the data has been shown in it.
3. Click on the column that you want to split the delimited texts to rows, and 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.
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.
Now the delimited texts have been split into rows.
5. Then close the window, a dialog pops out, click Keep button.
Then 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.
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
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.





- 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