View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Merge multiple row data in one cell with delimieters

One way. Just make sure that there is an empty column between last data and
the column to fill. If putting data in col G then col F should be blank

Sub mergecolumndata()
mc = "a"
lr = Cells(Rows.Count, mc).End(xlUp).Row
For Each c In Range(Cells(2, mc), Cells(lr, mc))
lc = Cells(c.Row, mc).End(xlToRight).Column + 1
mystr = ""
For i = 1 To lc
mystr = mystr & Cells(c.Row, i) & ","
Next i
cells(c.Row, "g") = Left(mystr, Len(mystr) - 2)
Next c
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Terryrubby" wrote in message
...
I have a single row of data, which will grow, which I need to merge into a
long list of text in one cell, so I can paste into another program. I
have
started with the concantenate function, but I could do with a function to
automatically go down the list until there is no more data. I think I
have
seen this done, but I can't remember how.
TIA