
Learn how to split combined text strings (like product codes and SKU batches) into separate columns using delimiters and text slicing functions.

When data is exported from accounting software, CRM tools, or website databases, it often arrives packed into a single messy text column—for example, "PROD101-ELE-2026" or "Jakarta, Indonesia". To sort by category or filter by year, you need to split these pieces into their own dedicated columns.
The character separating the pieces (like a hyphen -, comma ,, or space) is called a Delimiter. You can split delimited text using spreadsheet formulas or Excel's built-in Text to Columns tool.
Spreadsheet text functions help you locate the delimiter and extract the exact piece you need:
| Function | Example for "PROD101-ELE-2026" | Extracted Result |
|---|---|---|
LEFT |
=LEFT(A2, FIND("-", A2)-1) |
PROD101 (Extracts letters before the first hyphen) |
MID |
=MID(A2, FIND("-", A2)+1, 3) |
ELE (Extracts 3 characters starting after the hyphen) |
RIGHT |
=RIGHT(A2, 4) |
2026 (Extracts the last 4 characters on the right) |
Practice splitting structured SKU codes into clean catalog columns:
In cell B2, find the hyphen and extract all characters to the left of it.
=LEFT(A2, FIND("-", A2)-1)
In cell B2, extract the Item Code from the raw code in A2 before the hyphen. Formula: =LEFT(A2, FIND("-", A2)-1).
In cell C2, start 1 position after the hyphen and extract exactly 3 letters.
=MID(A2, FIND("-", A2)+1, 3)
In cell C2, extract the 3-letter Category Code following the hyphen. Formula: =MID(A2, FIND("-", A2)+1, 3).
In cell D2, grab the 4 digits from the right end of the text string.
=RIGHT(A2, 4)
In cell D2, extract the 4-digit Batch Year/ID from the end of the text. Formula: =RIGHT(A2, 4).
In cell E2, combine the Item Code and Batch Year into a clean label like PROD101 (2026).
=LEFT(A2, FIND("-", A2)-1) & " (" & RIGHT(A2, 4) & ")"
In cell E2, assemble a clean display label combining Item Code and Batch in parentheses. Formula: =LEFT(A2, FIND("-", A2)-1) & " (" & RIGHT(A2, 4) & ")".
If you have thousands of rows to split without formulas in desktop Excel, highlight your column and go to Data > Text to Columns > Delimited and choose the hyphen or comma separator to split your data instantly!
Spread the word with your peers and challenge your friends