Blog
How to Split Cells in Excel: Text to Columns, TEXTSPLIT
To split cells in Excel, you split the text inside one cell into several columns, using Text to Columns, Flash Fill or the TEXTSPLIT function. Excel can't divide a single cell the way Word divides a table cell, so "split" always means moving parts of the value into neighboring columns. The need shows up every time data comes from another system: a student information system export that crams course code, course name and period into one Class cell, a roster with "Last, First" names, or a guardian column holding a name and a phone number. Until those parts have their own columns, you can't sort by period, run a mail merge for parent letters or look anything up. Here is how to pick the right method and split without overwriting data or losing leading zeros.
Which method to use
There are four ways to split a cell's contents, and the shape of your data decides which one fits.
| Method | Splits by | Best for | Updates when source changes |
|---|---|---|---|
| Text to Columns | A delimiter or fixed width | One-off cleanup of consistent data | No, run it again |
| Flash Fill | A pattern you type as an example | Names and codes with a regular shape | No, run it again |
| TEXTSPLIT | A delimiter, inside a formula | Files you paste in every week | Yes |
| LEFT / MID / FIND | Character positions | Repeat jobs in older Excel versions | Yes |
For a file you clean once, Text to Columns or Flash Fill is fastest. If the same export lands in your inbox every week, a formula saves you from redoing the work next time. Unmerging cells is a different task, covered further down.
Split text with Text to Columns
Microsoft's guide to the Convert Text to Columns Wizard describes splitting a cell's text at a delimiter such as a comma or space, or at a fixed width. The steps:
- Select the column to split and go to Data → Text to Columns (in the Data Tools group).
- In step 1, choose Delimited. If every value has the same length, such as fixed-width student ID numbers, choose Fixed width.
- In step 2, tick the delimiters your data uses. For anything else, tick Other and type the character. The example splits email addresses at
@.

- In step 3, set the data format for each column and the Destination, the first cell where results go. Don't skip this. By default the results start in the source column and spill right, and Excel overwrites whatever is there after a single confirmation prompt.

- Click Finish.

If the delimiter has spaces around it, such as " | ", the split parts keep a leading or trailing space. Either tick the space delimiter too and turn on Treat consecutive delimiters as one, or wrap the results in =TRIM(cell). If the values themselves contain spaces, like course names, treating space as a delimiter scatters them across columns, so TRIM is the safer route.
Split by example with Flash Fill
Flash Fill watches what you type and repeats the pattern. Type the result you want for the first row in the column next to your data, move to the next cell, and press Ctrl + E, or click Data → Flash Fill. The same command also sits under Home → Fill.

According to Microsoft's Flash Fill help page, if no preview appears as you type, you can run it manually with Data → Flash Fill or Ctrl + E, and turn on automatic previews with the Automatically Flash Fill box under Advanced editing options. Its output is plain values, not formulas, so it won't update when the source changes. With only one example, it can latch onto the wrong rule, so give two or three examples that cover different shapes (a class without a period, a name with a middle initial, a hyphenated last name) and scan the results before moving on.
Split with formulas: TEXTSPLIT, LEFT, MID and FIND
Microsoft 365, Excel 2024 and Excel for the web have the TEXTSPLIT function. =TEXTSPLIT(C2," | ") splits C2 at " | " and spills the parts into the cells to the right. Because the delimiter includes the spaces, there is nothing left to trim, and when you paste a new export over the source, the results recalculate. For several delimiters, use an array constant: =TEXTSPLIT(C2,{"|","/"}). For values separated by line breaks inside a cell (Alt + Enter), use =TEXTSPLIT(A2,CHAR(10)). If you only need the part before or after a delimiter, TEXTBEFORE and TEXTAFTER are simpler: =TEXTAFTER(B2,", ") pulls the first name out of "Ruiz, Dana".
In Excel 2021 and earlier, cut by position. For Dana Ruiz / 555-0142, the name is =TRIM(LEFT(E2,FIND("/",E2)-1)) and the phone is =TRIM(MID(E2,FIND("/",E2)+1,50)). FIND locates the slash; LEFT and MID take what is before and after it.
Unmerge cells or add a diagonal line
Some people searching for "split cells" want to undo a merge. Select the merged cell, open the arrow next to Home → Merge & Center and choose Unmerge Cells. A merged range keeps its value only in the top-left cell, so after unmerging the other cells are empty. Fill them with the value above before sorting or filtering, or the rows lose their label.

If you want one header cell to look like two, with "Student" in one corner and "Week" in the other on an attendance grid, that's formatting, not splitting. Press Ctrl + 1, open the Border tab and click the diagonal border button. Type "Week", press Alt + Enter, type "Student", then add spaces before "Week" to push it to the right of the line.
👉 Merge and Unmerge Cells in Excel Without Losing Data
Worked example: splitting a weekly roster export
A ninth-grade team lead pulls a 300-row export from the district's student information system every Monday: one row per student per class across the team's sections. Column C, Class, reads 00125 | Algebra I | P3, meaning course code, course name and period. Column D holds the student's absences so far. Column E, Guardian, reads Dana Ruiz / 555-0142, and column F has the mailing ZIP code used for attendance letters.
First, insert three empty columns to the right of column C. Both Text to Columns and TEXTSPLIT write to the right, so without room they either overwrite the absences in column D or return a #SPILL! error.
Second, check that every row has the same structure. Some classes have no period and read 00311 | Study Hall. In a helper column, =LEN(C2)-LEN(SUBSTITUTE(C2,"|","")) counts the pipes in each row. Filtering for anything other than 2 showed 14 of the 300 rows. Adding | - to those rows keeps the period column from pulling in the wrong value.
Third, enter =TEXTSPLIT(C2," | ") in D2 and fill down. In Excel 2021 or earlier, use Text to Columns with | under Other and TRIM the results.
Fourth, protect the leading zeros. Course code 00125 is text to the district but a number to Excel, so a General-format split turns it into 125, which no longer matches the course catalog. If you used Text to Columns, set the code column to Text in step 3. ZIP codes behave the same way: 02134 becomes 2134 unless the column is Text, and a letter mailed to a four-digit ZIP code comes back. With TEXTSPLIT, the results are already text, so codes keep their zeros.
Finally, split Guardian at the slash the same way, then compare the source and result: the row count should still be 300 and =SUM() of the absences should match the original. Skipping that last check is how one malformed row puts a student on the wrong period list or sends an attendance letter to the wrong family.

Version differences and repeat files
Text to Columns has been in every desktop version of Excel for decades and works the same in Excel for Mac. Flash Fill arrived in Excel 2013. TEXTSPLIT, TEXTBEFORE and TEXTAFTER need Microsoft 365, Excel 2024 or Excel for the web, and anyone opening your file in Excel 2019 sees #NAME? instead of the results. Paste the results as values before sharing the file with someone on an older version.
For an export with the same layout every week, Power Query is worth setting up once. Select the range, choose Data → From Table/Range, select the column, then Home → Split Column → By Delimiter, and click Close & Load. Next Monday, paste the new export into the source range and click Refresh All; the same split runs again. The same setup works for a personal budget, where a bank export packs date, merchant and category into one description field.
Fixes when a split goes wrong
Data in the next column disappeared. The destination was the source column itself. Press Ctrl + Z at once, insert empty columns or choose an empty destination, and split again.
Codes lost their leading zeros. The column was split as General. Redo the split from the original with that column set to Text in step 3.
Values turned into dates. Parts like 10/3 or 1-2 look like dates to Excel. Setting the column to Text in step 3 prevents it.
Flash Fill got a few rows wrong. Those rows follow a different pattern. Type the correct value in one of them and Excel updates the rest.
FAQ
Q. How do I split one cell into two in Excel?
Split its contents into two columns with Text to Columns, Flash Fill or TEXTSPLIT. The cell itself can't be divided. To make one header cell look like two, add a diagonal border.
Q. Why did my split overwrite other data?
Text to Columns writes into the columns to the right of the source. Insert empty columns first or set a different Destination in step 3.
Q. How do I split text separated by line breaks?
In step 2 of Text to Columns, click in the Other box and press Ctrl + J to enter a line break as the delimiter. In Microsoft 365, =TEXTSPLIT(A2,CHAR(10)) does it with a formula.
Q. Can the split update automatically when the data changes?
Yes, if you split with a formula such as TEXTSPLIT or LEFT/MID/FIND, or with Power Query and Refresh. Text to Columns and Flash Fill only store the values at the moment you run them.
inline AI for roster and form exports
inline AI splits the class, guardian and contact fields of the export you have open into new columns, keeps course codes and ZIP codes as text, and lists the rows that don't follow the pattern. A request like "Split the Class column into code, course and period and check the absence total" covers the Monday cleanup in one step.
Gradebooks and spreadsheets, finished by inline AI in the file itself.
Ask in one sentence for roll-ups, trackers and the cleanup you repeat every week. Your files never leave your computer.




