View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 293
Default Merge 1000+ cells into one

Hi Paul,

For Column A, from row 1 to the last used row, try:
Sub Concat()
Dim MyString As String, i As Integer
With ActiveSheet
For i = 1 To .Range("A65536").End(xlUp).Row
MyString = MyString & """" & .Cells(i, 1).Value & """"
Next
.Cells(i, 1).Value = MyString
End With
End Sub

--
Cheers
macropod
[Microsoft MVP - Word]


"PVANS" wrote in message ...
Good morning

I am really hoping someone can help me with this.

I have a worksheet with 1 column (A) and 1439 rows. I need to combine all
1439 of these cells into one, using the following format:
A1 & "" & A2 & "" etc.

Naturally, doing this manually would take several hours (and be extremely
vulnerable to mistakes.) Is there a method using VBA that I could do this?

Thanks for any ideas.

Paul