Member-only story

Pivot a Column of Values to a Comma-Separated List in Google Sheets

Josh Otwell
2 min readAug 10, 2024

--

The TEXTJOIN function in Google Sheets can be used to merge multiple cell values into a single, comma-separated list, simplifying data management and analysis.

Suppose you have this data in a column in a Google or Excel spreadsheet:

And need the data formatted into a comma-separated list like this: SQL,PHP,HTML,CSS,C++,Java,Python

Image by Gerd Altmann from Pixabay

You can use the TEXTJOIN function in Google Sheets (and Excel) to create a comma-separated list of values from an entire column of rows.

For the example data above, I enter the formula using TEXTJOIN like this:

=TEXTJOIN(",",TRUE,A2:A8)

TEXTJOIN accepts 3 arguments or parameters:

  1. The delimiter
  2. TRUE or FALSE (to ignore empty values)
  3. The text to join

Here is TEXTJOIN in action for this example:

--

--

Josh Otwell
Josh Otwell

Written by Josh Otwell

SQL/PHP | Photography | Technical Consultant. Sign-up for my free developer newsletter, OpenLampTech, here: openlamptech.substack.com

No responses yet