Concatenate several cells with a comma
Page 1 of 1
Concatenate several cells with a comma
Hello Everyone,
I am sharing a small trick which i used just now to concatenate several cells with a comma in between with the help of VBA
Select all the cells you want to join and run this code
C2 is the output cell where cells are concatenated
Regards,
Ranjith
I am sharing a small trick which i used just now to concatenate several cells with a comma in between with the help of VBA
Select all the cells you want to join and run this code
- Code:
Public Sub JoinCells()
Dim cell As Variant, MyCell As String
For Each cell In Selection
MyCell = MyCell + cell + ","
Next
Range("C2") = MyCell
End Sub
C2 is the output cell where cells are concatenated
Regards,
Ranjith
ranjithkumar8352- Posts : 5
Join date : 2014-05-14
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Wed May 21, 2014 8:04 pm by Admin
» Microsoft Office 2013 full version free download
Tue May 20, 2014 6:02 pm by Admin
» Automatically login to Gmail from excel using VBA
Sun May 18, 2014 1:41 pm by ranjithkumar8352
» Internet download manager lifetime crack download
Sun May 18, 2014 1:32 pm by Admin
» Create In-cell bar charts in Excel
Thu May 15, 2014 6:41 am by ranjithkumar8352
» Concatenate several cells with a comma
Wed May 14, 2014 6:00 pm by ranjithkumar8352
» New users please read this.
Tue May 13, 2014 11:16 pm by Admin