New Tool Radar

AI for Data & Spreadsheets

How to Split a Column by Delimiter with Power Query in Excel

Split a combined name or code column into separate columns with Power Query so each part can be sorted and checked.

Schematic illustration for How to Split a Column by Delimiter with Power Query in Excel: three numbered steps - From Table/Range; Split Column, By Delimiter; Check the split rows.

A column that holds first name and last name together cannot be sorted by surname, and a code column that holds size and colour together cannot be filtered by either. Power Query splits a column on a delimiter such as a comma or a space, and the split can be re-run when the data refreshes.

Prerequisites

  • Excel with Power Query
  • A table with a combined column, such as full name
  • A copy of the source file, so the original stays untouched.

Steps

  1. Select the table and go to Data, From Table/Range to open it in the Power Query Editor.
  2. Select the combined column, then go to Home, Split Column, By Delimiter.
  3. Pick the delimiter, such as a space or a comma, and choose to split at each occurrence.
  4. Rename the new columns, for example First name and Last name, and check rows where the name has more parts than expected.
  5. Click Close and Load, then spot-check five rows against the original column.

Worked example: Fictional full names split into first and last name

The practice table below is a fictional five-person list after splitting. The count column is 1 per person, and the total is the number of people. The table below is fictional practice material, with fictional values. It is the expected result, worked out by hand, not a run of any tool.

First name Last name Count
Amara Okafor 1
Ben Whitfield 1
Clara Jensen 1
Dev Patel 1
Elena Rossi 1
Total 5

Expected result. Five names split, each first and last name in its own column, and the count is 5.

Limits

  • A name with two first names or a double surname will split into more parts than expected, so check those rows.
  • Splitting does not change the source data, so the original combined column stays in the source.

Sources

See all