Concatenate Rows?????????


Posted by Danielle on February 21, 2001 4:49 AM

Hello!!

I hope someone can help as this is driving me crazy!! Does anyone know of a way of merging a number of rows in the same column into one single row other than using that concatenate function through Excel (using this I have to enter each line number and then it will only merge up to 30 lines). Basically, I have a paragraph of text that has been imported into Excel over a number of different lines. I now want to see them just in one.

Thank you!!!!

Danielle



Posted by Celia on February 21, 2001 7:55 AM


Danielle
Here's one way.
Select the cells you want to concatenate and then run this macro (it will put the concatenated cells in A1) :-

Sub MergeCells()
Dim cell As Range
For Each cell In Selection
Range("A1").Value = Range("A1") & " " & cell
Next
End Sub

Celia