Splitting Combined Text into Columns
Splitting Combined Text into Columns

Splitting Combined Text into Columns

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

M. Ichsanul Fadhil
Published

Why This Feature Matters

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.

How Text Slicing Works

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)

Step-by-Step Practice Guide

Practice splitting structured SKU codes into clean catalog columns:

Practice 1 — Extract Item Code (Left of Hyphen)

In cell B2, find the hyphen and extract all characters to the left of it.

=LEFT(A2, FIND("-", A2)-1)
Check answer
Challenge #1
Target: Sheet1!B2

In cell B2, extract the Item Code from the raw code in A2 before the hyphen. Formula: =LEFT(A2, FIND("-", A2)-1).

Practice 2 — Extract 3-Letter Category Code

In cell C2, start 1 position after the hyphen and extract exactly 3 letters.

=MID(A2, FIND("-", A2)+1, 3)
Check answer
Challenge #2
Target: Sheet1!C2

In cell C2, extract the 3-letter Category Code following the hyphen. Formula: =MID(A2, FIND("-", A2)+1, 3).

Practice 3 — Extract 4-Digit Batch Year

In cell D2, grab the 4 digits from the right end of the text string.

=RIGHT(A2, 4)
Check answer
Challenge #3
Target: Sheet1!D2

In cell D2, extract the 4-digit Batch Year/ID from the end of the text. Formula: =RIGHT(A2, 4).

Practice 4 — Assemble Clean Display Label

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) & ")"
Check answer
Challenge #4
Target: Sheet1!E2

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!

Tactical Arena

Share This Lesson

Spread the word with your peers and challenge your friends

Discussion
0 Comments
No comments yet. Be the first to share your thoughts!