Skip to content
EditFlip
ENRO
Back to blog
Excel

How to turn an Excel column into a comma-separated list

To join a column into one line, use TEXTJOIN with a comma as the separator. Older versions of Excel need a small trick instead.

Eric Rada · Founder · · 6 min read

In short

  • In Excel 2019 or Microsoft 365, type =TEXTJOIN(", ",TRUE,A1:A20) in an empty cell. It joins the cells of the column into one line, with a comma and a space between them, and skips the blanks.
  • In an older Excel, copy the column into Word and replace the paragraph marks with a comma, or build the line with the & sign. To go the other way, use Text to Columns.
  • Clean up an Excel column before you join it

A column of names, e-mail addresses or product codes often has to become one line: for a mailing field, a search box, a database filter or a line of code. Typing the commas by hand is slow and you will miss one. Excel can do the joining for you, and it takes a single formula.

This guide shows the formula, the way to do it in versions of Excel that do not have it, the three things that go wrong most often (blank cells, dates and the wrong separator), and how to split a comma list back into separate cells. It also says plainly which part of the job EditFlip can help with, because the joining itself is done in Excel.

On EditFlip, step by step

  1. Step 1

    Open the sheet

    Go to editflip.com, press Choose files and pick the workbook, or drop it on the page. When the Options panel comes up, press Edit. Every sheet is a tab at the bottom, so go to the one with your column.

  2. Step 2

    Clean the column first

    Scroll down the column and look for empty cells, typos and repeats. Tap a cell and type to correct it. To remove a blank line for good, delete that row. A tidy column gives a tidy list, and you will not get two commas in a row.

  3. Step 3

    Press Done and Download

    Press Done. The cleaned file is made with “(edited)” after its name. Press Download, or Share on a phone, so you have the corrected column on your device.

  4. Step 4

    Join the cells in Excel

    Open that file in Excel, click an empty cell and type the TEXTJOIN formula with your column range. Copy the result and paste it as values. EditFlip does not join cells for you, so this last step happens in Excel or in a program that has TEXTJOIN.

The TEXTJOIN formula, piece by piece

The formula has three parts. The first is the separator, the second says whether to skip empty cells, and the third is the range. For a column in A1 to A20 it reads: =TEXTJOIN(", ",TRUE,A1:A20). The result is a single cell with every value in it, like Anna, Ben, Carla, Dan.

The separator goes in quotation marks. A comma and a space makes a readable list. If the receiving system wants no space, use "," alone. You can use any other mark too: a semicolon, a slash, a line break, or a plain space.

TRUE means empty cells are ignored. Change it to FALSE and every empty cell leaves an empty slot, so you get two commas in a row. In nearly every case TRUE is the one you want.

Which versions of Excel have it

TEXTJOIN came in with Excel 2019 and Microsoft 365, and it is in later versions, including Excel for the web. Excel 2016 without a Microsoft 365 subscription, and Excel 2013, do not have it. If you type the formula there, you will see a #NAME? error.

Not sure which you have? Type =TEXTJOIN( in a cell. If Excel shows a tip with the pieces of the formula, you have it. A spreadsheet in Google Sheets has a TEXTJOIN function too, with the same three parts.

One more thing about regional settings. In some countries, including Romania and Germany, Excel expects a semicolon between the parts of a formula, not a comma. The same formula then looks like =TEXTJOIN(", ";TRUE;A1:A20). If the first version gives an error about the formula, try this one.

A trick for older versions of Excel

The quickest way without TEXTJOIN uses Word. Select the column in Excel and copy it. Paste it into a Word document, where each cell becomes a line. Press Ctrl+H, put ^p in the Find box (that is the code for a paragraph mark), put a comma and a space in the Replace box, and press Replace All. The lines become one.

Another way stays inside Excel. In the cell next to the first value, type a formula such as =A1&", ", and copy it down the column. Then join the results by hand, or with the older CONCATENATE function, which needs each cell named one by one. For a list of ten or twenty values this is fine. For a thousand, use Word.

Either way, remember the last comma. The paste trick leaves one at the very end, and the & formula does too. Delete it before you use the line.

Numbers, dates and spaces that surprise you

TEXTJOIN joins what is stored in the cell, not what you see. A date looks like 02.08.2026, but Excel stores it as a number such as 46236, and that number is what lands in your list. To keep the date, wrap it: TEXT(A1,"dd.mm.yyyy"). For a whole column, you can put that formula in a helper column and join the helper column instead.

A percentage such as 25% is stored as 0.25 and will come out that way. A number with a fixed number of decimals can lose its trailing zero, so 4.50 becomes 4.5. If those details matter, turn the column into text first with the TEXT function, with a format code that shows what you need.

Spaces cause trouble too. A value with a space at the end, from a copied web page or an old export, will carry that space into your list, and the list will look slightly off. Clean the column first. Our guide on removing extra spaces in Excel covers TRIM and the hidden non-breaking space.

Making the result stay put

The cell with TEXTJOIN holds a formula. If you delete or move the column it points to, the line changes or turns into an error. When you only need the text, select the cell, copy it, then use Paste Special and choose Values. The cell now holds plain text, and you can delete the column.

There is a limit to know about: one Excel cell can hold up to 32,767 characters. A list of 20,000 short words can run past that, and the formula will give an error. If you reach it, split the column into two or three blocks and join each one.

If you want to paste the line into another program, click the cell, copy the text from the formula bar and paste it. Copying the cell itself can bring Excel's formatting along.

Splitting a comma list back into cells

The reverse is easier. Select the cell that holds the line, open the Data tab and press Text to Columns. Choose Delimited, press Next, tick Comma, and finish. Each item lands in its own cell across the row. If your list has a space after each comma, also tick Space, or clean the spaces afterwards.

To get a column instead of a row, copy the row, right-click the first cell where it should go and use Paste Special with Transpose ticked. In recent Microsoft 365 versions the TEXTSPLIT function can split straight into rows, but Text to Columns works everywhere.

Text to Columns writes over the cells to the right of the one you split, without asking. Make sure there is nothing there you want to keep, or move the line to a clean sheet first.

On a phone, and what EditFlip does here

On a phone you may not have Excel at all. EditFlip opens the workbook in the browser and lets you tap into cells, correct values, add or delete rows and columns, and download the result. The formulas that are already in a file keep working. It does not have a function list or a Find and Replace, and I would not rely on it for building a long TEXTJOIN. Use it to get the column right.

The file stays on your device the whole time. Nothing is uploaded, so it is a fair choice for a list of customers or e-mail addresses. If what you need at the end is something to hand over and not to edit, you can convert the workbook to a PDF from the Options panel.

Open the workbook, tap into the column, fix the typos and delete the blank rows, then download the cleaned file and join it with TEXTJOIN in Excel. Free, no account, and the file stays on your device.

Clean an Excel column on EditFlip →

Questions

How do I convert an Excel column to a comma-separated list?

In Excel 2019 or Microsoft 365, type =TEXTJOIN(", ",TRUE,A1:A20) in an empty cell, with your own range. The cell then holds the whole column as one line.

How do I do it in an old version of Excel without TEXTJOIN?

Copy the column into Word, press Ctrl+H, find ^p and replace it with a comma and a space. Delete the last comma.

How do I leave out the empty cells?

Set the second part of TEXTJOIN to TRUE. Empty cells are then skipped. With FALSE you get an empty slot, and two commas in a row.

Why does my date come out as a number?

Excel stores dates as numbers, and TEXTJOIN uses the stored value. Wrap the date in TEXT, for example TEXT(A1,"dd.mm.yyyy"), and join that.

Why do I get a formula error with the comma version?

Some regional settings use a semicolon between the parts of a formula. Try =TEXTJOIN(", ";TRUE;A1:A20).

How do I split a comma-separated list back into cells?

Select the cell, open Data, press Text to Columns, choose Delimited and tick Comma. Each item goes into its own cell.

Can EditFlip join the cells for me?

No. EditFlip lets you open and edit the workbook, but the joining is done with a formula in Excel. It is useful for cleaning the column first.

Do it right in your browser.
Free, no account. Your files stay on your device.
Edit an Excel file