I need to Combine a List numbers with no spaces

Occasional Visitor

How can I combine numbers from one column into one cell with commas but no space in between. Example: 1,2,3,4,5

I tried using =TEXTJOIN(“,”,TRUE,A1:A68) and I tried the CONCAT option. They seem to do the trick, but when I copy the outcome to a word to check it, there is a space either before or after the comma.
Can I get rid of the space all together?

1 Reply


Can't replicate that issue when working with real numbers, but if the "numbers" in the Excel file are in fact texts, they might include leading and/or trailing spaces. Wrap the range at the end of the TEXTJOIN in TRIM, so that it will look like this: =TEXTJOIN(",",TRUE,TRIM(A1:A68))