Thread: Comma
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Comma

10 * 3000 = 30000 + 2999 commas + 6000 double quotes would make more
characters than a cell can hold.

Sub CCC()
Dim cell As Range, s As String
For Each cell In Range("A1:A3000")
s = s & """" & cell.Value & ""","
Next
Range("B9").Value = Left(s, Len(s) - 1)


End Sub

would be the basic approach

--
Regards,
Tom Ogilvy


"MarkyMark" wrote:

Is there away to create a macro to put numbers in one row with comma
between them instead having them in 3000 rows?
From
A
1 5656565656
2 5353535353
3 6262626262
4 3535353535
5 2326235623

To
A
1 "5656565656","5353535353","6262626262","3535353535 ","2326235623"