KeepSorted

Google Sheets SPLIT formula: split text into columns or rows by a comma, space or any character

Say which cell holds the text and what separates the parts. Copy the formula. You can split one cell into columns or into rows, split a whole column at once, or take only the 2nd or the last part. It runs in your browser and nothing you type here is sent anywhere. Every formula below was run in a real Google Sheet on 3 November 2026 (parts with spaces, empty parts, a trailing comma, upper and lower case, numbers with leading zeros, dates, empty cells) once in a US-locale spreadsheet and once in a German-locale one with semicolons: all checks matched.



Your formula

How to use it

Paste the formula into one empty cell. The parts spill to the right (columns) or down (rows), so the cells next to it must be empty, or Sheets shows a #REF! error. The whole-column choices need the cells below and to the right to be empty too.

Which one to pick

You pickThe formula uses
Into columnsSPLIT(A2, ",")
Into rowsTRANSPOSE(SPLIT(A2, ","))
Whole columnARRAYFORMULA(IFERROR(SPLIT(A2:A, ","), ""))
Nth partINDEX(SPLIT(A2, ","), 1, 2)
Last partINDEX(SPLIT(A2, ","), 1, COLUMNS(SPLIT(A2, ",")))
Spaces cutARRAYFORMULA(TRIM(SPLIT(A2, ",")))

The catches (found by testing in a real Sheet)

No code: KeepSorted

The add-on sorts the original table in place without code: no second copy, so formatting, checkboxes and notes move with their rows and people keep editing the same table. Select the range, pick the sort columns, Save. Free: one area per tab, up to 2 sort columns, no trial clock. Pro ($5/month or $39/year): up to 5 sort columns, custom orders like High > Medium > Low, ticked checkbox rows to the bottom, stacked tables sorted separately, and sorting after form responses, other editors' changes and an hourly check.

KeepSorted is built and in testing. It is not in the Google Workspace Marketplace yet. Leave your email and we send one message when you can install it.

You're on the list. We'll email you when KeepSorted is ready.

The generators and the formulas stay free either way.

More KeepSorted tools and guides

Sources