Use =TEXTJOIN(", ",TRUE,A2:A100) in Excel to combine the values in A2:A100 into one comma-and-space-separated string while skipping empty cells.
The source range is the only part that normally needs changing. If the first data row is in B2 and the last is in B50, replace A2:A100 with B2:B50. Keep the heading outside the range so it does not become part of the list.
In this formula, ", " is the separator, TRUE tells Excel to ignore empty cells, and the range supplies the values. Change the separator to "," if you want commas without a following space. Duplicate values are still included because TRUE skips blanks rather than duplicates.
TEXTSPLIT works in the opposite direction: it splits one delimited string into rows or columns rather than joining a column. For an Excel version without TEXTJOIN, a short fixed list can be built with =A2&", "&A3&", "&A4, although that method becomes cumbersome as the range grows.

Build the joined result in Excel
- Select an empty cell outside the source table. This prevents the formula from referring to itself or interfering with the cells being combined.
- Enter =TEXTJOIN(", ",TRUE,A2:A100) and press Enter. The range should begin with the first data row and end with the last data row.
- Adjust the range to match the worksheet. For example, use B2:B50 for a column beginning in B2 and ending in B50.
- Change ", " to "," when the destination requires commas without spaces. Leave the final argument as TRUE when empty cells should not produce extra separators; TRUE is the second argument, and A2:A100 is the final argument.
- Check the result cell, then copy the generated text and paste it into the intended destination. The cell continues to contain the Excel formula rather than a manually typed list.
This formula can create a readable list of tags, names, IDs, domains, or product codes. It is also the right starting point when the destination is a plain-text field rather than a system that parses CSV.
Protect commas and quotes for CSV
TEXTJOIN joins cell text as it appears. It does not wrap each value in double quotes or escape a double quote already inside a value. If A2 contains Smith, Jane, the plain formula includes that comma in the combined text, and a CSV-aware application may interpret it as the boundary between two fields.
When every original cell must remain one CSV field, use this quote-safe version instead:
=TEXTJOIN(",",TRUE,IF(A2:A100="","",""""&SUBSTITUTE(A2:A100,"""","""""")))
The outer part of the formula wraps each non-empty value in double quotes. The SUBSTITUTE function doubles every embedded double quote, while TRUE excludes empty results. For example, a cell containing 6" bolt becomes "6"" bolt" in the CSV sequence. In an Excel version that requires an array formula, press Ctrl+Shift+Enter to confirm it.
| Output need | Suitable method | What it produces | Important limitation |
|---|---|---|---|
| Readable list for plain text | Standard TEXTJOIN | Values joined by the selected comma separator | Does not add CSV quoting or escape embedded quotes |
| One row for a CSV-aware application | Quote-safe TEXTJOIN formula | Every value is quoted, and internal double quotes are doubled | Older Excel versions may require array-formula confirmation |
| Conversion without an Excel formula | Column to Comma Separated List browser tool | A converted sequence with default CSV quoting and a displayed value count | Accepts pasted vertical values rather than a worksheet range or formula |
| SQL, JSON, URL, or command-line syntax | A destination-specific formatter | Syntax tailored to the target system | Generic CSV output does not satisfy these formats safely |
Convert a column without using an Excel formula
The Column to Comma Separated List tool provides a browser-based workflow for turning one value per line into a comma-separated sequence. It does not evaluate Excel formulas; it receives a vertical paste and converts the values directly in the current browser.
- Copy one spreadsheet column without its heading and paste it into the tool with one value on each line. Lists copied from common spreadsheet programs and editors are accepted with Windows CRLF, older carriage-return, or Unix line-feed separators.
- Decide whether to trim surrounding spaces, remove blank lines, or remove duplicate values. These choices determine the final list and its displayed count.
- Keep CSV-quote every value enabled when any entry may contain a comma or double quote, then select Convert column.
- Compare the displayed final value count with the number expected after the selected cleaning options. Inspect entries containing punctuation, especially commas, double quotes, leading spaces, or trailing spaces.
- Select Copy result and paste the sequence into the intended destination. The output is displayed in a read-only box so it can be checked before copying.
Conversion happens entirely in the browser. Pasted values are not sent to a server, and the page does not create a saved document or retain an input history. Reloading the page clears the working input and output. The tool accepts up to 500,000 input characters and 10,000 lines, which are explicit processing limits designed to protect browser responsiveness.
Control trimming, blanks, and duplicates
Cleaning options are useful for pasted spreadsheet data, but each one can change the number of resulting values. The settings have specific meanings rather than acting as a general-purpose whitespace cleaner.
| Setting | Exact behavior | Practical use |
|---|---|---|
| Trim surrounding spaces | Removes spaces at the beginning and end of each line before other filters run; internal spaces remain unchanged. | Remove incidental padding without collapsing names or phrases |
| Remove blank lines | Discards lines that are empty after the selected trimming behavior. | Exclude gaps in a list that should not become values |
| Remove duplicate values | Keeps the first occurrence and discards later exact matches after trimming. Matching is case-sensitive. | Remove repeats only when repeated identifiers or labels have no meaning |
| CSV-quote every value | Wraps every value in double quotes and doubles any double quote inside it. | Preserve field boundaries when values may contain commas or quotes |
| CSV quoting off | Joins values with a comma and space instead of adding CSV quoting. | Create a simple list of uncomplicated labels or prose |
Deduplication does not change letter case, so Apple and apple remain separate values. This protects identifiers, names, and codes that differ only by capitalization. The result count always reflects the final list after the selected filters, not necessarily the number of pasted lines.
Turning CSV quoting off produces cleaner-looking output for simple labels, but it becomes ambiguous when a value itself contains a comma or double quote. Leaving quoting enabled also makes empty or whitespace-sensitive field boundaries visible when blank lines and surrounding spaces have deliberately been retained.
Verify values before copying
Begin with the source row count, then account for every filtering choice. If duplicate removal is enabled, the expected result count is the number of retained unique values. If blank lines are removed, those lines should not be included in the comparison. A mismatch is a signal to revisit the trim, blank-line, and duplicate settings rather than accepting the output without review.
Inspect values that could be split or interpreted differently after joining. Pay particular attention to names containing commas, measurements containing double quotes, leading or trailing spaces, empty entries, and values that differ only by capitalization. In a CSV-aware destination, the quoted output is generally safer because each source value remains visibly bounded.
For a plain-text application, the quotation marks may appear literally. That is expected: CSV quoting is a data-format convention, not a decorative style. Decide whether the destination expects to parse CSV before choosing between quoted and unquoted output.
Match the output to its destination
A comma-separated string is not automatically valid in every application. CSV-aware software expects quoting rules, while SQL, JSON, URL parameters, and command-line arguments use different escaping and security conventions.
Do not paste generic CSV output directly into a SQL query as a substitute for bound parameters. SQL strings, identifiers, and parameterized statements have separate rules, so use a dedicated SQL workflow when the destination is a database. The same caution applies to JSON strings, URL-encoded values, and shell arguments.
The browser converter deliberately does not infer database language, SQL literal syntax, shell escaping, JSON, or spreadsheet formula rules. For the original Excel task, use the plain TEXTJOIN formula for a readable joined list, the quote-safe formula for a CSV row, or the browser workflow when you want the conversion performed outside Excel with automatic CSV quoting and a final-value check.
Related reading: List Randomizer Cheat Sheet: Rules, Controls, Results.
Related reading: Switch First and Last Names in Excel With Spaces.