I have a column of text - stock symbols. How do I convert this column to a single line of text with each symbol seperated by a comma? I need to be able to copy this line to a text document. Thanks.
I have a column of text - stock symbols. How do I convert this column to a single line of text with each symbol seperated by a comma? I need to be able to copy this line to a text document. Thanks.
You will get a better response if you list a sample of the data
Clarification.
Example:
Column of Stock Symbols
ICE
ATHR
LVS
RIMM
AAPL
How do I convert to:
ICE,ATHR,LVS,RIMM,AAPL
Thanks
Try this on for size:
Open VBA (ALT+F11), right-click on your VBAProject for the current workbook (e.g. "VBAProject (Book1)") and choose Insert -- Module.
Paste the following code into the new Module (or current module if you already have one):
Close VBA, and you're all set to use this UDF in your worksheet. Usage as follows:Please Login or Register to view this content.
In any cell, type: =CONCAT(range,"optional delimiter")
For example, =CONCAT(A1:A100,",")
This will concatenate all cells from A1 to A100 and insert a comma in between each entry. If you want a comma then a space, just change the delimiter to ", " (The delimiter must be in quotation marks!)
Hope that helps.
Last edited by Paul; 02-11-2007 at 07:50 PM.
Thanks Paul. I'll give it a try.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks