Google-sheets – Constrain a Array formula result to a list in a single cell

concatenategoogle sheets

I'm using a formula that returns an Array of strings, so the result overwrites a range of cells, but I want to get the result in just that one cell.

(The actual formula I'm using is WIKISYNONYMS from a 3rd party add-on, but that shouldn't matter.)

I tried using ARRAY_CONSTRAIN, eg.

=ARRAY_CONSTRAIN( WIKISYNONYMS("en:Berlin"), 1, 1 )

But that throws away all the data that would have gone beyond the constraints, rather then constraining all the data to that one cell.

So I tried using concatenate, eg.

=CONCATENATE( WIKISYNONYMS("en:Berlin") )

And that is close, but I need to add ", " or something like that between each entry for readability.

Best Answer

You can use JOIN to stitch the pieces together with a given delimiter:

=join(",", f o r m u l a )