Excel Split Delimited Text to Rows: 2 Ways
In this article
To split delimited text into separate rows in Excel, use the "Text to Columns" feature for a one-time conversion, or Power Query's "Split Column by Delimiter" with "Rows" as the split option for a repeatable, automated approach. This article explains both methods step by step, covers common pitfalls, and answers frequently asked questions.
Why Split Delimited Text to Rows?
Excel users often receive data where multiple values are crammed into a single cell, separated by commas, semicolons, or other characters. For example, a cell might contain "Apples, Bananas, Cherries" and you need each fruit in its own row for filtering, pivot tables, or charting. Splitting to rows (rather than columns) is essential when the data represents a list of items that should each be a record in a database or a row in a report.
The two main built-in tools are Text to Columns (which normally splits to columns, but with a workaround can produce rows) and Power Query (which has a direct "Split to Rows" option). Power Query is available in Excel 2016 and later, including Microsoft 365.
Method 1: Power Query (Recommended for Repeatable Tasks)
Power Query is the cleanest way to split delimited text into rows because it does not alter your original data and can be refreshed if the source changes.
- Select the range containing your delimited text.
- Go to the Data tab and click From Table/Range. If your data isn't already a table, Excel will prompt you to create one.
- In the Power Query editor, select the column you want to split.
- Click Split Column in the Home tab, then choose By Delimiter.
- Choose your delimiter (comma, semicolon, custom, etc.) and select Split into Rows (not columns).
- Click OK and then Close & Load to place the result in a new worksheet.
This method automatically expands each delimited value into its own row, while repeating the other columns' values for each new row. It handles thousands of rows efficiently and is fully repeatable—just refresh the query if the source data changes.
Method 2: Text to Columns + Transpose
If you prefer a non-Power Query approach, you can use Text to Columns and then transpose the result. This works well for one-off tasks.
- Select the column with delimited text.
- Go to Data > Text to Columns.
- Choose Delimited and click Next.
- Select your delimiter (e.g., comma) and click Finish. The text will split into separate columns.
- Select the resulting range (with the split columns), copy it, right-click where you want the rows, and choose Paste Special > Transpose.
This converts the columns into rows, but it only works for a single cell or a single row at a time. If you have multiple rows of delimited data, you would need to repeat the process for each row, which is tedious. For multiple rows, Power Query is far more efficient.
How to Choose the Right Method
Your choice depends on your specific situation:
- One-time split of a single cell or row: Use Text to Columns + Transpose.
- Multiple rows of delimited data: Use Power Query to split to rows directly.
- Data that updates regularly: Use Power Query so you can refresh the query.
- No access to Power Query (Excel 2013 or earlier): Use a formula approach (see below) or the Text to Columns + Transpose method.
Formula Alternative for Older Excel Versions
If you cannot use Power Query, you can use a formula to extract each delimited value into a separate row. This requires a helper column with sequential numbers.
Assuming your text is in cell A1 and you want the first value in cell C1, enter this formula in C1 and drag down:
=TRIM(MID(SUBSTITUTE(A$1,",",REPT(" ",LEN(A$1))), (ROW()-ROW(C$1))*LEN(A$1)+1, LEN(A$1)))
This formula replaces each comma with a large number of spaces, then extracts a segment of that length based on the row number. It works for a single cell and must be adapted for multiple cells. It is less intuitive but does not require any special tools.
Common Problems and How to Avoid Them
- Trailing spaces: Use
TRIM()to remove extra spaces after splitting. - Empty values: If your delimiter appears consecutively (e.g., "a,,b"), Power Query will create empty rows. You can filter them out in the query editor.
- Delimiter appears within text: If your data uses quotes to indicate that a comma is part of the value (e.g., "Smith, John", "Doe, Jane"), Power Query's splitter can handle this if you choose the "Quote character" option.
- Multiple delimiters: If your data uses both commas and semicolons, you may need to pre-process the data to standardize the delimiter.
- Losing original data: Power Query does not overwrite your original data; it creates a new table. Text to Columns overwrites the original column, so consider copying the data first.
Frequently Asked Questions
Can I split to rows without Power Query?
Yes, you can use Text to Columns followed by Transpose, but it is only practical for a single cell or row. For multiple rows, the formula method or Power Query is better.
Why is my Text to Columns splitting into columns instead of rows?
Text to Columns is designed to split into columns. To get rows, you must transpose the result after splitting. Power Query has a direct "Split to Rows" option.
Does splitting to rows affect the rest of my data?
Power Query creates a new table, so your original data remains untouched. Text to Columns overwrites the original column, so it is best to work on a copy.
Can I split by a custom delimiter like a pipe or tab?
Yes. In both Text to Columns and Power Query, you can specify a custom delimiter. In Power Query, choose "Custom" and enter the character.
What if my data has thousands of rows?
Power Query handles large datasets efficiently and is the recommended approach. Text to Columns may become slow and unwieldy for thousands of rows.
Is there a way to split to rows automatically when new data is added?
Yes, if you use Power Query and your source data is in an Excel table, you can refresh the query to include new rows. The split will automatically apply to the new data.