Change allingment and add a comma

MDuff

Well-known Member
Joined
Dec 29, 2002
Messages
529
Hi all does some one know an easy wat to turn what is show below in to this 309,317,801 etc.
Moto splits.xls
BCDE
4309310803
5317311804
6801313
7802314
8805316
9813811
10814823
11815
12816
13818
14820
15821
Sheet1


thanks a lot
 

Some videos you may like

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

can you not format them as ###","

or are you joining the numbers together?
 

MDuff

Well-known Member
Joined
Dec 29, 2002
Messages
529
onlyadrafter


I need to Join all the numbers together but as a string

"309,317,801..." etc

thanks
 

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

are you joining every cell shown, or just each cell in each column?
 

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

for a VB version use

Code:
Sub concat()
For MY_COLS = 1 To Range("IV1").End(xlToLeft).Column
    For MY_ROWS = 1 To Cells(65536, MY_COLS).End(xlUp).Row
    If MY_STRING = "" Then
        MY_STRING = Cells(MY_ROWS, MY_COLS)
    Else
        MY_STRING = MY_STRING & "," & Cells(MY_ROWS, MY_COLS)
    End If
       Next MY_ROWS
    Cells(MY_ROWS, MY_COLS).Value = MY_STRING
    MY_STRING = ""
Next MY_COLS
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,111,910
Messages
5,541,542
Members
410,549
Latest member
Anaarchie
Top