<link rel="stylesheet" type="text/css" href="/mirawhite.css">

How to split text in a cell in Excel

Updated November 26, 2026

In Excel, select the column, go to Data > Text to Columns, choose Delimited, tick the delimiter (comma, space or your own character) and click Finish: each part lands in its own column. In Microsoft 365 and Excel 2024, the formula =TEXTSPLIT(A2,",") does the same job and updates itself. In Google Sheets, use Data > Split text to columns or =SPLIT(A2,",").

How to split text to columns in Excel with a delimiter

Text to Columns works in Excel for Microsoft 365 and Excel 2016 to 2024 on Windows. It splits one column at a time: the first part stays in place and the others go into the columns to its right.

  1. Insert enough empty columns to the right of the column to split: one for each extra part.
  2. Select the cells, or the whole column, that contain the text. The range can have any number of rows but only one column.
  3. Go to Data > Text to Columns, in the Data Tools group. The Convert Text to Columns Wizard opens.
  4. Choose Delimited, then click Next.
  5. Tick the delimiter used in your data, for example Comma or Space, or tick Other and type your own character, such as | or -. The Data preview shows the result.
  6. Click Next, check the Destination cell where the split data should start, then click Finish.

Good to know : The parts replace whatever is in the columns to the right, so keep them empty or set Destination to a free area, such as $D$2. The result is plain values: if the source text changes, run the wizard again or use a formula.

Fixed width, leading zeros and columns to skip

Some exports have no delimiter but fields of fixed length, such as “10001NEWYORK”, where the first five characters are the ZIP code. In step 1 of the wizard, choose Fixed width. In step 2, click in the Data preview to add a break line, drag it to move it and double-click it to remove it.

Step 3 controls how each new column is stored. Click a column in the Data preview, then pick its Column data format:

  • Text keeps leading zeros in codes and IDs, such as 02134, which General would turn into 2134.
  • Date converts dates stored as text; choose the order (MDY, DMY, YMD) in the Date box.
  • Do not import column (skip) drops a part you don’t need, for example a middle name.

How to separate first and last names with Flash Fill

Flash Fill learns from an example you type. It needs no formula and is the quickest way to split full names in Microsoft 365 and Excel 2016 to 2024.

  1. With full names in column A, click B2 and type the first name of A2 exactly as you want it, then press Enter.
  2. Go to Data > Flash Fill, or press Ctrl+E. Excel fills the rest of column B.
  3. Click C2, type the last name of A2, press Enter, then Ctrl+E again.
  4. Scan the results, especially rows with a middle name or a two-part last name, and correct one example if needed: Flash Fill updates the others.

Good to know : Flash Fill writes fixed values. If nothing happens, type a second example, or tick Automatically Flash Fill in Excel’s advanced options.

How to split text in Excel using a formula: TEXTSPLIT

TEXTSPLIT works like the wizard in formula form, and the result updates when the source changes. It exists in Excel for Microsoft 365 (Windows and Mac), Excel for the web and Excel 2024, but not in Excel 2021 or older, which show #NAME?.

Type it in B2: the parts spill into B2, C2, D2 and so on. Then fill it down, one formula per row. If a cell in the way is not empty, you get a #SPILL! error.

  • =TEXTSPLIT(A2,", ") uses comma plus space as one delimiter, so the parts do not start with a space.
  • =TEXTSPLIT(A2,{",",";"}) splits at a comma or a semicolon.
  • =TEXTSPLIT(A2,,",") splits text to rows: the parts spill down instead of across.
  • =TEXTSPLIT(A2,CHAR(10)) splits a cell that contains line breaks made with Alt+Enter.
=TEXTSPLIT(A2,",")

Split first and last names with TEXTBEFORE, TEXTAFTER or LEFT

Splitting on every space breaks “Mary Kay Andersen” into three columns. TEXTBEFORE and TEXTAFTER (Microsoft 365, Excel for the web and Excel 2024) cut at one chosen space only:

  • =TEXTBEFORE(A2," ") returns the first name, everything before the first space.
  • =TEXTAFTER(A2," ") returns everything after the first space, which keeps “van Eaton” together.
  • =TEXTAFTER(A2," ",-1) returns the last word only: a negative number searches from the end.
  • For “Smith, John”, use =TEXTBEFORE(A2,",") for the last name and =TRIM(TEXTAFTER(A2,",")) for the first name.
=LEFT(A2,SEARCH(" ",A2)-1)

Good to know : The LEFT formula above works in every version, Excel 2019 and older included: it returns the text before the first space. For the rest of the name, use =RIGHT(A2,LEN(A2)-SEARCH(" ",A2)). Both return #VALUE! when a cell has no space.

How to split text to columns in Google Sheets and LibreOffice

For a formula, =SPLIT(A2,",") puts each part in its own cell on the row. By default SPLIT cuts at each character of the delimiter, so =SPLIT(A2,", ") splits at every comma and every space; write =SPLIT(A2,", ",FALSE) to use the pair as one delimiter.

In LibreOffice Calc, select the column and choose Data > Text to Columns: the dialog offers separators or fixed width, with a preview. In Excel for the web, Data > Split Text to Columns lets you pick the delimiters and click Apply.

  1. In Google Sheets, select the cells to split, or paste the data first.
  2. Go to Data > Split text to columns.
  3. Sheets guesses the delimiter. To change it, open the menu next to “Separator” (set to Detect automatically) and pick another character.

Common problems

  • Leading zeros or codes turned into dates: in step 3 of the wizard, set those columns to Text before clicking Finish.
  • Empty columns appear between parts: the text has double spaces or doubled delimiters. Tick “Treat consecutive delimiters as one”, or clean the column first with =TRIM(A2).
  • #NAME? with TEXTSPLIT, TEXTBEFORE or TEXTAFTER: your Excel is 2021 or older. Use Text to Columns, Flash Fill or the LEFT and SEARCH formula.

Spread a list over several columns with Utiloz

Sometimes “text to columns” means the reverse: one long list, one item per line, to spread over several columns before printing it or pasting it into a sheet. List to columns on Utiloz does it in one step: choose a number of columns (up to 50) or of lines per column, then the “Tabs (paste into Excel)” output. Pasted into A1, each item lands in its own cell. The Columns → list direction turns columns copied from Excel back into a single list.

It does not split a cell at a delimiter: for “Smith;John”, keep Text to Columns or TEXTSPLIT. To cut a long text into chunks of N characters, words or lines, for example to stay under the 32,767-character limit of an Excel cell, use Split text into chunks. Both tools run in your browser, with no upload and no sign-up.

Frequently asked questions

How do I split text in a cell in Excel?

Select the cell or column, go to Data > Text to Columns, choose Delimited, tick the character that separates the parts and click Finish. In Microsoft 365 or Excel 2024, =TEXTSPLIT(A2," ") gives the same result as a formula that updates itself.

How do I split text into two columns in Excel?

If one delimiter appears once, Text to Columns gives two columns. If it appears several times, as with spaces in names, use =TEXTBEFORE(A2," ") and =TEXTAFTER(A2," ") to cut at the first space only, or Flash Fill with Ctrl+E.

How do I split text to rows in Excel?

Leave the column delimiter empty and give a row delimiter: =TEXTSPLIT(A2,,",") spills the parts down the column. In Excel 2021 or older, split to columns with Text to Columns, copy the result, right-click the target cell and choose Transpose under Paste Options.

How do I split text in Google Sheets?

Select the cells and go to Data > Split text to columns, then choose the separator if Sheets guessed wrong. As a formula, =SPLIT(A2,",") fills the cells to the right; add FALSE as third argument when the delimiter has several characters.

← All guides