Create comma-delimited string from dynamic range?

P

Ptyrider

I have a column of student ID numbers, a list of indefinite length,
like this:

A
40001
40003
40004
40008
..
..
..

And I just need to create a string from these numbers, comma
delimited, in another cell for use elsewhere. The above would become:
40001,40003,40004,40008.

If the list were not of indefinite length (but not more than, say,
10), it would be very trivial indeed. I can create a dynamic range,
but don't know what to do with it for this application. Any
suggestions for a slick efficient way to get that string via formula?
Or should I just go for a macro to loop through the range?
 
P

pinmaster

Hi,

Here's one way:

Insert or use a blank column, then if your data starts in A1 in b2 type:
=A1&","&A2, in B3 type: =B2&","&A3, copy B3 to the last data cell which you
can then copy and paste, delete the column when done.

Hope this helps!
Jean-Guy
 
P

Ptyrider

Thanks, not a bad idea!
Hi,

Here's one way:

Insert or use a blank column, then if your data starts in A1 in b2 type:
=A1&","&A2, in B3 type: =B2&","&A3, copy B3 to the last data cell which you
can then copy and paste, delete the column when done.

Hope this helps!
Jean-Guy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top