fx Data Cleaning

Text to Columns — delimited and fixed width

⏱ 9 min

What you'll learn

  • Split delimited or fixed-width exports into safe destination columns.
  • Preserve identifier zeros with Text and convert dates with DMY.
  • Skip unneeded fields without shifting meaningful empty columns.

Concept

Works in every Excel version.

1. Delimited — split at a separator

A column contains: Rahul Sharma,9876543210,Delhi

  1. Select the column.
  2. Data → Text to Columns.
  3. Choose Delimited → Next.
  4. Tick Comma (or Tab, Semicolon, Space, or type your own in Other, e.g. |).
  5. Next → Finish.

Result: Name, Mobile and City in three columns.

Tip: tick Treat consecutive delimiters as one when data has double spaces or double commas, so you don't get empty columns.

Only combine consecutive delimiters when they are redundant separators. In A,,C, the empty field may be meaningful; combining delimiters would shift C into the wrong column.

2. Fixed width — split at positions

Old software, bank statements and printed reports often line up data in fixed positions instead of separators:

20261001 NEFT RAHUL SHARMA      25000
20261003 UPI  NEHA GUPTA         1800

Choose Fixed width → Next. Click on the ruler to add break lines, drag to move them, double-click to remove. Preview shows the result.

3. Step 3: column formats (the important part)

In the last step, click each column in the preview and pick a format:

Format Use for
General normal numbers and text
Text PIN codes, product codes, account numbers — keeps leading zeros (00457 stays 00457) and stops long numbers turning into 9.88E+15
Date: DMY Indian dates like 15/08/2026 (see Module 5, Lesson 5)
Do not import column (skip) columns you don't want

4. Choose a destination

By default, results overwrite the original column and the columns to its right. Excel asks before replacing data, but it's easy to click OK. Set Destination to an empty cell (e.g. $F$1) to keep the original.

5. Splitting full names

Rahul Kumar Sharma split on Space gives three columns; Neha Gupta gives two. Names don't line up. For names, Flash Fill (Module 5, Lesson 3) or TEXTSPLIT is usually better.

6. Hidden use: fix numbers and dates stored as text

Select one column → Text to Columns → Finish (without changing anything). Excel re-reads every cell, and text-numbers often become real numbers. Choose Date: DMY in step 3 to fix text dates.

Common mistakes

Overwriting neighbouring columns. Losing leading zeros because the column was left as General. Splitting names with a space delimiter and getting misaligned columns.

Exercises

mediumPaste this and split it, keeping the PIN code as text and the date as a real date: 15/08/2026|Rahul Sharma|110005|25000 02/09/2026|Neha Gupta|302001|1800 Then skip the name column and send the output to column F.
On Delimited, select A2:A4, choose delimiter |, then Date DMY for field 1, Skip for Name, Text for PIN and General for Amount. Destination F2 produces three columns: dates 15-Aug,02-Sep,03-Sep-2026; PINs 110005,302001,00457 as text; amounts 25000,1800,900. The extra third row tests leading zeros. A8 = A,,C must keep its empty middle field when split on commas; leave Treat consecutive delimiters as one off. On Fixed Width, split after characters 8,13,33, set date YMD and destination F2; trim name fields if padding remains.

Quiz

Which format keeps 00457 as it is?
Text
Data is aligned in fixed positions with no separator. Which option?
Fixed width
How do you avoid overwriting existing columns?
Set a Destination cell
Text to Columns — delimited and fixed width · Foundations | ExcelWalaa