Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
March 2017
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  

Calendar Calendar


Concatenate several cells with a comma

View previous topic View next topic Go down

Concatenate several cells with a comma

Post by ranjithkumar8352 on 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
avatar
ranjithkumar8352

Posts : 5
Join date : 2014-05-14

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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