ExcelPro
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» How to Unprotect an excel sheet without password
Concatenate several cells with a comma EmptyWed May 21, 2014 8:04 pm by Admin

» Microsoft Office 2013 full version free download
Concatenate several cells with a comma EmptyTue May 20, 2014 6:02 pm by Admin

» Automatically login to Gmail from excel using VBA
Concatenate several cells with a comma EmptySun May 18, 2014 1:41 pm by ranjithkumar8352

» Internet download manager lifetime crack download
Concatenate several cells with a comma EmptySun May 18, 2014 1:32 pm by Admin

» Create In-cell bar charts in Excel
Concatenate several cells with a comma EmptyThu May 15, 2014 6:41 am by ranjithkumar8352

» Concatenate several cells with a comma
Concatenate several cells with a comma EmptyWed May 14, 2014 6:00 pm by ranjithkumar8352

» New users please read this.
Concatenate several cells with a comma EmptyTue May 13, 2014 11:16 pm by Admin

March 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031

Calendar Calendar

Keywords

password  excel  


Concatenate several cells with a comma

Go down

Concatenate several cells with a comma Empty Concatenate several cells with a comma

Post by ranjithkumar8352 Wed May 14, 2014 6:00 pm

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 Smile

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
ranjithkumar8352

Posts : 5
Join date : 2014-05-14

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum