Cell combination

  • Thread starter Thread starter vhopvista
  • Start date Start date
V

vhopvista

Thank for reply Gord.

What I am looking for is to combine say hundred of first names i
seperate cells into one single cell in which the data ( names) ar
seperated by a comma.

The Excel Help just show two cells, I don't know how to combine data o
lots of cells into one with a comma between them ( data).

Vincen
 
In addition to Dave's link to John's site and UDF..........

I prefer this one because it won't leave a bunch of ,,,commas if there are
blank cells in the list.

Function ConCatRange(CellBlock As Range) As String
Dim Cell As Range
Dim sbuf As String
For Each Cell In CellBlock
If Len(Cell.text) > 0 Then sbuf = sbuf & Cell.text & ","
Next
ConCatRange = Left(sbuf, Len(sbuf) - 1)
End Function

You can change the delimiter to what you want.

Gord Dibben Excel MVP
 
Back
Top