Split Text into Columns in Excel: TEXTSPLIT, Formulas & Sheets

Split text into columns in Excel and Google Sheets with TEXTSPLIT, Text to Columns and SPLIT
Image: Spreadsheet Tutorials & Productivity (original graphic)

You have one column full of combined values, such as product codes like TSH-BLU-M or names like Lopez, Maria, and you need each part in its own column. Excel gives you three good ways to do this: the TEXTSPLIT function, the Text to Columns wizard, and classic LEFT/MID/RIGHT formulas that work in any version. Google Sheets has its own SPLIT function. This guide walks through each one with the same sample data so you can pick the method that fits your file.

Quick answer: In Microsoft 365, type =TEXTSPLIT(A2,"-") and the pieces spill into the cells to the right. In Google Sheets, use =SPLIT(A2,"-"). For a one-time cleanup in any Excel version, use Data > Text to Columns.

Sample data

Each SKU combines a category, a color and a size, separated by hyphens. The parts have different lengths (CAP vs. HOOD, M vs. XXL), which is exactly what makes a fixed-width approach fail.

RowA: SKUB: CategoryC: ColorD: Size
2TSH-BLU-MTSHBLUM
3HOOD-GRN-XLHOODGRNXL
4CAP-BLK-OSCAPBLKOS
5SOCK-WHT-LSOCKWHTL
6TSH-RED-STSHREDS
7JKT-NAVY-XXLJKTNAVYXXL
8HOOD-GRY-MHOODGRYM
9CAP-RED-OSCAPREDOS
10TSH-BLK-LTSHBLKL
11SOCK-BLU-MSOCKBLUM

Columns B to D show the result every method below should produce.

Excel sheet where TEXTSPLIT in B7 splits JKT-NAVY-XXL into JKT, NAVY and XXL
TEXTSPLIT in B7 spills the three parts of the SKU into B7:D7. Image: Spreadsheet Tutorials & Productivity (original screenshot)

Method 1: TEXTSPLIT (Microsoft 365)

TEXTSPLIT is the fastest option if your Excel has dynamic arrays. It is available in Microsoft 365 and Excel for the web; Excel 2021 and earlier do not include it. Enter this in B2:

=TEXTSPLIT(A2,"-")

The formula returns three values and spills them into B2, C2 and D2. Fill it down to B11 and every row splits the same way. In row 7, for example, JKT-NAVY-XXL becomes JKT, NAVY and XXL.

Useful TEXTSPLIT options

The full syntax is:

=TEXTSPLIT(text, col_delimiter, [row_delimiter], [ignore_empty], [match_mode], [pad_with])
  • Several delimiters at once: pass an array constant, for example =TEXTSPLIT(A2,{"-","/"}) splits on both hyphens and slashes.
  • Double delimiters: if your data has TSH--M, set ignore_empty to TRUE so the empty piece is skipped: =TEXTSPLIT(A2,"-",,TRUE).
  • Split into rows instead of columns: leave the column delimiter empty and use the row delimiter: =TEXTSPLIT(A2,,"-").

Because the results spill, the cells to the right must be empty. If C2 or D2 already contain something, you get a #SPILL! error instead of the result.

Method 2: Text to Columns (any Excel version)

Text to Columns is a built-in wizard that splits values once and writes plain text into the cells. Nothing updates later, which is fine for a one-time cleanup.

  1. Select A2:A11.
  2. Go to Data > Text to Columns.
  3. Choose Delimited and click Next.
  4. Uncheck Tab, check Other and type a hyphen -. The preview shows the three columns.
  5. Click Next. Set Destination to $B$2 so the original SKUs in column A stay untouched.
  6. Click Finish.

Tip: on the last step you can select a column in the preview and set its format to Text. Do this for parts such as 007 or 0412; with the default General format, Excel converts them to numbers and drops the leading zeros.

Method 3: LEFT, MID and RIGHT formulas (all versions)

If you need results that update automatically but your Excel has no TEXTSPLIT, you can find the position of each hyphen with FIND and cut the text around it.

First part (category)

=LEFT(A2,FIND("-",A2)-1)

Middle part (color)

=MID(A2,FIND("-",A2)+1,FIND("-",A2,FIND("-",A2)+1)-FIND("-",A2)-1)

Last part (size)

=RIGHT(A2,LEN(A2)-FIND("-",A2,FIND("-",A2)+1))

Filled down to row 11, these three formulas return exactly the values in columns B to D of the sample table, including HOOD/GRN/XL in row 3 and CAP/BLK/OS in row 4.

One formula for any part

The nested FIND calls get messy when there are more than three parts. A shorter pattern replaces every hyphen with 100 spaces, cuts out a 100-character slice, and trims the spaces away:

=TRIM(MID(SUBSTITUTE($A2,"-",REPT(" ",100)),(COLUMN(A1)-1)*100+1,100))

Enter it in B2 and fill it right and down. COLUMN(A1)-1 is 0 in column B, 1 in column C and 2 in column D, so each column picks the next part. This works as long as each part is shorter than 100 characters and the parts themselves do not contain spaces you need to keep at the edges.

Google Sheets: the SPLIT function

Google Sheets has its own function that behaves much like TEXTSPLIT:

=SPLIT(A2,"-")

The result expands into the cells to the right. The full syntax is SPLIT(text, delimiter, [split_by_each], [remove_empty_text]). Watch the third argument: it defaults to TRUE, which means every character in the delimiter is treated as a separate delimiter. =SPLIT(A2,", ") therefore splits on commas and spaces. To split only on the exact text ", ", use:

=SPLIT(A2,", ",FALSE)

Sheets also has a menu option, Data > Split text to columns, which works like Excel's Text to Columns.

How it works

Every method relies on the same idea: a delimiter marks where one part ends and the next begins. TEXTSPLIT and SPLIT find all delimiters for you and return an array. Text to Columns does the same, then pastes the values. The LEFT/MID/RIGHT approach does it by hand: FIND returns the position of the first hyphen, and FIND("-",A2,FIND("-",A2)+1) starts searching one character after it to locate the second hyphen. Subtracting those positions gives the length of the middle part.

Which method should you use?

  • TEXTSPLIT: best choice in Microsoft 365 when the source data changes.
  • Text to Columns: best for a quick, one-time cleanup in any version.
  • LEFT/MID/RIGHT or TRIM/MID/SUBSTITUTE: live results in older Excel or files shared with people on older versions.
  • SPLIT: the go-to option in Google Sheets.

Common mistakes

  • Blocked spill range. TEXTSPLIT and SPLIT need empty cells to the right. Clear them or move the formula.
  • Overwriting your data with Text to Columns. Without a Destination, the first part replaces the original value in column A.
  • Lost leading zeros. Set split columns to Text in the wizard when parts look like numbers.
  • Missing delimiter. If a cell has no hyphen, FIND returns #VALUE!. Wrap the formula in IFERROR if some rows may be incomplete.
  • Extra spaces. Data like Lopez, Maria leaves a leading space after splitting on a comma. Split on ", " or wrap the result in TRIM.

FAQ

Why don't I see TEXTSPLIT in my Excel?

TEXTSPLIT is a dynamic array function available in Microsoft 365 and Excel for the web. In Excel 2021 or earlier, use Text to Columns or the LEFT/MID/RIGHT formulas shown above.

Can I split by more than one delimiter?

Yes. In Excel, use an array constant such as =TEXTSPLIT(A2,{"-","/"}). In Google Sheets, SPLIT already treats each character of the delimiter as separate by default, so =SPLIT(A2,"-/") splits on both.

Does Text to Columns update when the source changes?

No. It writes static values. If the SKUs change, run the wizard again or switch to a formula.

How do I split text into rows instead of columns?

Use the row delimiter argument of TEXTSPLIT, for example =TEXTSPLIT(A2,,"-"), which stacks the parts vertically.

Summary

To split text into columns, use =TEXTSPLIT(A2,"-") in Microsoft 365, =SPLIT(A2,"-") in Google Sheets, Text to Columns for a one-time job, or LEFT/MID/RIGHT formulas when you need live results in an older version. Always check for blocked spill ranges, leading zeros and stray spaces. For more cleanup techniques, browse our Data Cleaning tutorials, or see the Excel label for related formulas.

Comments