0

I have the task of creating a simple Excel sheet that takes an unspecified number of rows in Column A like this:

1234
123461
123151
11321

And make them into a comma-separated list in another cell that the user can easily copy and paste into another program like so:

1234,123461,123151,11321

What is the easiest way to do this?

Raystafarian
  • 21,963
  • 12
  • 64
  • 91

2 Answers2

0

Yes, I know this is a duplicate question. I'm sorry, I did everything wrong. But I have a great answer. I only signed up to I could post an answer to this question. But you needed a 10 reputation to answer the original question.

To solve this problem, don't use code and don't use CONCATENATE because it's too cumbersome.

Use the Excel formula TEXTJOIN

You can pick your delimiter

For example

=TEXTJOIN(",",,A1:A4)

Results in: 1234,123461,123151,11321

Yay! Please share this as I can't stand to see people struggle in Excel! It's amazing! Excel changed my life!

0

If you have Office 365 Excel then you can use TEXTJOIN():

=TEXTJOIN(",",TRUE,A:A)

If not then you need to use a helper column:

In B1 put:

=A1&","&B2

And copy down.

Then in another cell put:

=Left(B1,Len(b1)-1)

enter image description here

Scott Craner
  • 23,868