ListFerret mascot

Home › Guides › Comma Separated List to Column (Excel, Sheets)

Comma Separated List to Column: Split a Comma List into Rows in Excel, Sheets and Online

Someone sends you ava@example.com, ben@example.com, cleo@example.com in one long line, or an export gives you a list of IDs on a single row, and you need them one per line so you can sort them, compare them or paste them into a spreadsheet. This guide shows the quickest way to split a comma separated list into a column in each common tool, and the one situation where a simple split goes wrong.

The quick answer

Split a comma separated list online

If the list is in an email, a document or a web page, you do not need a spreadsheet. Copy it, paste it into the converter and the column appears as you type. The useful settings are:

You can also remove duplicates and sort at the same time, which is usually the next thing you want. Everything runs in your browser, so a list of customer emails or internal IDs never leaves your computer.

In Google Sheets

Put the comma separated text in A1. Then in another cell:

=ARRAYFORMULA(TRIM(TRANSPOSE(SPLIT(A1, ","))))

SPLIT cuts the text at each comma and spreads the pieces across a row. TRANSPOSE turns that row into a column. TRIM removes the spaces left after each comma, and ARRAYFORMULA lets TRIM work on all the pieces at once.

One trap: SPLIT treats every character in the delimiter as a separator by default. If you write SPLIT(A1, ", ") it splits on commas and on spaces, so “New York” becomes two cells. Use just "," and let TRIM handle the spaces, as above.

In Excel

Excel 365 and Excel 2021 have TEXTSPLIT. Its arguments are the text, the column delimiter, then the row delimiter, so putting the comma in the third position sends the pieces down rows:

=TRIM(TEXTSPLIT(A1, , ","))

On older versions there is no formula for it, but the Text to Columns tool plus a paste option does the same job:

  1. Select the cell with the list, then choose Data → Text to Columns.
  2. Choose Delimited, tick Comma and finish. The items now run across a row.
  3. Copy that row, right-click the first cell where you want the column, and choose Paste Special → Transpose.

In a text editor or on the command line

WhereHow
Notepad++Open Find and Replace, set the search mode to Extended, replace , with \r\n. To remove the spaces after commas too, use the Regular expression mode and replace ,\s* with \r\n.
Visual Studio CodeTurn on regular expressions (Alt+R) and replace ,\s* with \n.
PowerShell"ava, ben, cleo" -split ",\s*" prints one item per line.
macOS or Linuxecho "ava, ben, cleo" | tr -s ', ' '\n' splits on commas and spaces.

The tr command splits on every comma and every space, like Sheets does by default, so it also breaks multi-word items. Use it for single-word values only.

The quoted-comma trap

All of the methods above cut at every comma. That is correct for a plain list such as IDs or email addresses. It is wrong when an item itself contains a comma and has been protected with quotes, as CSV files do:

"Smith, John","Jones, Amy",Lee

This is three items, but a plain split produces five pieces, with stray quote marks. The online converter and the formulas above split at every comma and do not understand quotes. If your data looks like this, open the file in Excel or Google Sheets as a CSV instead (File → Open, or Data → From Text/CSV), because spreadsheet importers understand the quoting rules. Split on a different separator if you can: if your source uses semicolons or tabs between items, choose that in the converter instead.

Clean up the column afterwards

Once the items are in a column you can tidy them. Common next steps:

Frequently asked questions

How do I convert a comma separated list to a column?

Paste it into the List Converter, choose Comma as the input separator and New line as the output separator. In Google Sheets use =ARRAYFORMULA(TRIM(TRANSPOSE(SPLIT(A1, ",")))); in Excel 365 use =TRIM(TEXTSPLIT(A1, , ",")).

How do I split comma separated values into rows in Excel?

In Excel 365 or 2021, TEXTSPLIT(A1, , ",") returns them down a column. In older versions, use Data, Text to Columns with a comma delimiter, then copy the row and use Paste Special, Transpose.

Why does my split create extra blank items?

A doubled comma or a trailing comma creates an empty item. Turn on Remove empty items in the converter, or wrap the result in a formula that filters blanks.

Can I split on commas and keep quoted items together?

Not with a plain split. Items such as "Smith, John" need a CSV-aware importer, which spreadsheets provide through Data, From Text/CSV or by opening the file directly.

Does the converter upload my list?

No. It runs as JavaScript in your browser and your text is never sent anywhere, so it is safe to use with private lists.

Try it now: use the free List Converter - private, instant and runs in your browser. Open List Converter →

More guides

Share this page: XFacebookLinkedInRedditEmail