Excel Split Function Formula: How to Separate Text by Delimiter
In this article
The Excel TEXTSPLIT function (available in Microsoft 365 and Excel 2024+) lets you split text from one cell into multiple columns based on a delimiter like a comma, space, or semicolon. It replaces older, complex workarounds like Flash Fill or nested MID/SEARCH functions. You need Excel 2024 or Microsoft 365 with version 16.0.16026 or later to use TEXTSPLIT; older versions do not support it. If you don’t have it, use Text to Columns or helper formulas instead.
What You'll Need
- Microsoft 365 or Excel 2024 (version 16.0.16026 or newer)
- A cell containing text with a consistent delimiter (e.g., comma, space, pipe)
- Blank columns to the right of your source data to receive the split results
Step-by-Step
- Open your Excel workbook and locate the cell with the text you want to split — for example, cell A2 contains
John,Doe,Marketing,New York. - Click on the first empty cell where you want the first split result to appear — for example, cell B2.
- Type the formula:
=TEXTSPLIT(A2, ","). The first argument is the cell reference containing the text. The second argument is the delimiter — in this case, a comma. - Press Enter. Excel will automatically populate B2, C2, D2, and E2 with
John,Doe,Marketing, andNew Yorkrespectively. - If your delimiter is a space, use
=TEXTSPLIT(A2, " "). If it’s a pipe (|), use=TEXTSPLIT(A2, "|"). - To split by multiple delimiters (e.g., comma or semicolon), use an array:
=TEXTSPLIT(A2, {",", ";"}). This splits text wherever either delimiter appears. - If you want to preserve empty cells between delimiters (e.g.,
John,,Marketingshould show a blank in the middle), add a third argument:=TEXTSPLIT(A2, ",", , TRUE). The fourth argument is optional and defaults to FALSE; set it to TRUE to keep empty results. - To split text into rows instead of columns, add a fourth argument specifying a row delimiter:
=TEXTSPLIT(A2, ",", "\n"). This splits by comma horizontally and by line break vertically. - Drag the formula down to apply it to other rows. TEXTSPLIT will automatically fill the corresponding columns for each row.
- Once the results are correct, copy the entire range of split cells, right-click, and choose Paste Values to convert formulas to static text if needed.
Common Mistakes
- Using TEXTSPLIT in Excel 2019 or earlier — it will return a #NAME? error because the function doesn’t exist in those versions.
- Forgetting to use quotes around the delimiter — typing
=TEXTSPLIT(A2, ,)instead of=TEXTSPLIT(A2, ",")causes a syntax error. - Using a delimiter that appears within the data (e.g., splitting by space when names contain multiple words like "Mary Jane"), which breaks the split structure.
- Not leaving enough blank columns to the right — if the split produces more columns than available space, Excel will overwrite existing data without warning.
- Typing the delimiter as a number or symbol without quotes —
=TEXTSPLIT(A2, |)will fail; it must be=TEXTSPLIT(A2, "|").
Tips
- Use
TEXTSPLITwithTRIMto clean up extra spaces:=TRIM(TEXTSPLIT(A2, ","))ensures no leading or trailing spaces remain in split results. - Combine with
TEXTJOINto reassemble data after cleaning — useful for reversing the operation or creating custom formats. - Use named ranges for source data to make formulas more readable — e.g., name A2:A100 as "EmployeeData" and use
=TEXTSPLIT(EmployeeData, ","). - For CSV files imported into Excel, TEXTSPLIT is faster than Text to Columns because it’s dynamic and updates automatically when source data changes.
- If splitting dates or numbers, ensure the source text is formatted as text — not as date/number formats — or TEXTSPLIT may fail silently or return unexpected results.
- Use
IFERRORto handle rows with missing delimiters:=IFERROR(TEXTSPLIT(A2, ","), A2)will return the original text if splitting fails.
Troubleshooting
- If you see
#NAME?, your Excel version doesn’t support TEXTSPLIT. Confirm your version under File > Account > About Excel. If it’s older than 2024 or Microsoft 365, use Text to Columns instead. - If results are cut off or spill into other cells, ensure the destination area is empty. TEXTSPLIT is a dynamic array function and will overwrite adjacent data.
- If the formula returns a single cell instead of multiple columns, check that you didn’t accidentally press Ctrl+Enter — always press Enter only.
- If delimiters are ignored, check for hidden characters like non-breaking spaces (Alt+0160). Use
CLEAN(A2)orSUBSTITUTE(A2, CHAR(160), ",")before splitting. - If splitting by line breaks doesn’t work, use
CHAR(10)for Windows orCHAR(13)for Mac:=TEXTSPLIT(A2, ",", CHAR(10)). - If you get a
#SPILL!error, clear the cells below or to the right of your formula. Other data is blocking the dynamic range. - Restart Excel if the function suddenly stops working — temporary glitches can occur after updates.
Frequently Asked Questions
Can I use TEXTSPLIT in Excel 2019?
No. TEXTSPLIT was introduced in Microsoft 365 in 2023 and Excel 2024. Use Text to Columns or formulas like MID and SEARCH for older versions.What if my text has different numbers of delimiters per row?
TEXTSPLIT will still work — it creates as many columns as needed for the row with the most delimiters. Other rows will return blanks for missing values if you enable empty result retention.Can I split text into rows instead of columns?
Yes. Add a row delimiter as the fourth argument. For example,=TEXTSPLIT(A2, ",", CHAR(10)) splits by comma and then stacks results vertically.
Why does TEXTSPLIT ignore empty fields between commas?
By default, it skips empty results. To preserve them, add TRUE as the fifth argument:=TEXTSPLIT(A2, ",", , TRUE).
Can I split by more than two delimiters?
Yes. Use an array of delimiters:=TEXTSPLIT(A2, {",", ";", "|"}) to split by comma, semicolon, or pipe.
Does TEXTSPLIT work with numbers or dates?
It works on text values only. If your numbers or dates are formatted as numbers, convert them to text first usingTEXT(A2, "@") or format the cell as Text before pasting.