Something like concatenation

davey11372

Board Regular
Joined
Dec 19, 2009
Messages
56
I have a list of stock symbols (many hundreds) indexed in row A:A of an Excel worksheet, eg:

AQT
BSI
CMXO
DOD
ESTA


I need to merge the list into one cell with a comma (without any space) between the tickers, eg.

AQT,BSI,CMXO,DOD,ESTA

Any help would be appreciated.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Try this - result in B1

Code:
Sub concat()
Dim LR As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
Range("B1").Value = Join(Application.Transpose(Range("A1:A" & LR)), ",")
End Sub
 
Upvote 0
Say your list starts in A1...

- In B1 enter =A1
- In B2 enter =B1&","&A2
- Copy B2 down

The entry at the bottom of your copied list will be all the items joined.

Dom
 
Upvote 0

Forum statistics

Threads
1,226,730
Messages
6,192,698
Members
453,747
Latest member
tylerhyatt04

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top