Blog / Text

How to split text in Excel: 6 easy methods

3 November 2026 ยท 6 min read

Split names, emails and codes into separate cells in Excel with Text to Columns, Flash Fill, TEXTSPLIT, TEXTBEFORE and classic formulas, with worked examples.

Splitting text is one of the most common clean-up jobs in Excel. A full name needs to become a first and last name, an email address needs its domain pulled out, or an imported product code needs breaking into parts so you can sort and filter by them.

Excel gives you several ways to do it. Some are one-off tools that change your data once; others are formulas that update automatically when the text changes. This guide covers all of them, shows exactly when to use each, and points out the mistakes that trip people up.

Which method should you use?

A delimiter is the character that separates the parts: a space, a comma, a dash, an @ sign or a line break.

Method 1: Text to Columns

Text to Columns splits every cell in a column at once, using a delimiter or fixed character positions.

  1. Select the cells you want to split.
  2. On the Data tab, in the Data Tools group, click Text to Columns.
  3. Choose Delimited if a character separates the parts, or Fixed width if each part is always the same length. Click Next.
  4. Tick the delimiter, such as Space or Comma, or type your own in Other. Tick Treat consecutive delimiters as one if there may be double spaces. Click Next.
  5. Choose a Destination cell to the right of your data, so your original column is kept, then click Finish.

Text to Columns writes plain values, not formulas, so it will not update when the original text changes. It also overwrites whatever is in the columns to the right of the destination, so make sure they are empty first.

Method 2: Flash Fill

Flash Fill learns a pattern from an example you type.

  1. In the column next to your data, type the result you want for the first row. For "Maria Garcia", type Maria.
  2. Press Ctrl + E, or click Flash Fill on the Data tab.

Excel fills the rest of the column by following your example. Check a few rows, because Flash Fill guesses, and names with middle names or extra spaces can confuse it. Like Text to Columns, the results are fixed values.

Method 3: TEXTSPLIT

In Microsoft 365 and Excel 2024, TEXTSPLIT splits text into separate cells with a single formula:

=TEXTSPLIT(text, col_delimiter, [row_delimiter], [ignore_empty])

=TEXTSPLIT(A2, " ") splits "Maria Luisa Garcia" into three cells: Maria, Luisa and Garcia. The results spill to the right, so the cells next to the formula must be empty, or you will see a #SPILL! error.

A few useful variations:

Method 4: TEXTBEFORE and TEXTAFTER

Often you only need one part of the text. TEXTBEFORE returns everything before a delimiter, and TEXTAFTER returns everything after it.

B2=TEXTBEFORE(A2," ")
AB
1Full nameFirst name
2Maria GarciaMaria
3

Result: Maria. Everything before the first space.

A third argument chooses which delimiter to split at. Use -1 for the last one, which gets a last name however many middle names come first:

B2=TEXTAFTER(A2," ",-1)
AB
1Full nameLast name
2Maria Luisa GarciaGarcia
3

Result: Garcia. -1 splits at the last space.

The same two functions split an email address into its user name and domain:

B2=TEXTAFTER(A2,"@")
AB
1EmailDomain
2jordan.lee@contoso.comcontoso.com
3

Result: contoso.com. TEXTBEFORE(A2,"@") would return jordan.lee.

When names are stored as "Last, First", split at the comma and remove the leftover space with TRIM:

B2=TRIM(TEXTAFTER(A2,","))
AB
1NameFirst name
2Garcia, MariaMaria
3

Result: Maria. TRIM removes the space after the comma.

These formulas update automatically, so they are ideal for tables that get new rows.

Method 5: LEFT, MID, RIGHT and FIND (any version of Excel)

Before TEXTBEFORE existed, people combined FIND, which returns the position of a character, with LEFT, MID and RIGHT, which take characters from the start, middle or end. These work in every version of Excel.

To get the first name, take everything up to one character before the space:

B2=LEFT(A2,FIND(" ",A2)-1)
AB
1Full nameFirst name
2Maria GarciaMaria
3

Result: Maria. FIND returns 6, the position of the space, so LEFT takes 5 characters.

To get everything after the space, start one character after it and take plenty of characters; MID simply stops at the end of the text:

B2=MID(A2,FIND(" ",A2)+1,100)
AB
1Full nameLast name
2Maria GarciaGarcia
3

Result: Garcia. Asking for 100 characters is safe; MID returns only what is there.

Method 6: Split text without a delimiter

Some codes have no separator, but each part is always in the same position. Then LEFT, MID and RIGHT can split them by position alone. For the code "NY20260042", the city is the first 2 characters, the year the next 4, and the number the last 4:

B2=MID(A2,3,4)
AB
1CodeYear
2NY202600422026
3

Result: 2026. Start at character 3 and take 4 characters.

Text to Columns with Fixed width does the same job once, without formulas.

Common mistakes

Frequently asked questions

How do I split a cell into two columns in Excel? Select the column and use Text to Columns with your delimiter, or use TEXTBEFORE in one column and TEXTAFTER in the next.

How do I split text by a line break? Use =TEXTSPLIT(A2, CHAR(10)) in Microsoft 365. In Text to Columns, choose Other and press Ctrl + J in the box to enter a line break.

Can I split text with a formula in older versions of Excel? Yes. Combine LEFT, MID and RIGHT with FIND, as in Method 5. They work in every version.

Will my split update when the original text changes? Formulas such as TEXTSPLIT, TEXTBEFORE and LEFT update automatically. Text to Columns and Flash Fill do not.

Practice splitting text

Reading about these formulas is a start, but they only stick once you have typed them yourself. Our splitting text lesson gives you real names, emails and codes to split, and checks every answer instantly. For more detail on each function, see the guides to TEXTBEFORE and TEXTAFTER, LEFT, RIGHT and MID, FIND and SEARCH and TRIM.

Practise it: Splitting text into parts

Type the formulas yourself in a real spreadsheet, with instant feedback on every answer. Your first five lessons are free.

Start the lesson

Keep reading