Excel Macro to Merge Multiple Rows, Comma Separated

Here is a custom Excel Macro function that will do it as well to merge multiple rows into one row, comma separated

Excel Macro to Merge Multiple Rows, Comma Separated

Follow This Step :

  1. Alt + F11 to open the VB editor
  2. Insert\Module
  3. Paste the code below in the edit window
  4. Then put this formula in any cell
  5. =CommaCon(A1:A4)

Here is The code :
Function CommaCon(rng As Range) As String
'
' CommaCon Function
'
Dim Temp As String
Temp = ""
For Each Cell In rng
Temp = Temp & Cell.Value & ", "
Next Cell
CommaCon = Mid(Temp, 1, Len(Temp) - 2)
'
End Function