Change allingment and add a comma

MDuff

Well-known Member
Joined
Dec 29, 2002
Messages
529
Office Version
  1. 365
Platform
  1. Windows
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
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hello,

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

or are you joining the numbers together?
 
Upvote 0
onlyadrafter


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

"309,317,801..." etc

thanks
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,668
Members
448,977
Latest member
moonlight6

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top