Converting a column to a list
Well, thanks ... but I need to know how to create a function. Can you give me
a tip or two?
Joel
"Gord Dibben" wrote:
Joel
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
Usage is: =ConCatRange(A1:A10) or whatever your range is.
Gord Dibben MS Excel MVP
|