[HOW]Excel column to 1 cell

robibrk

Regular Member
Joined
Aug 23, 2009
Messages
321
Reaction score
121
I have an excel file with one column A (800 lines)- 1 keyword per line. I want join all this keywords to one cell (i know, it will be a large one:D) each KW trimmed with , or |.

Is there any way for this?
 
Last edited:
copy to editor and then back to excel...
 
Code:
Function CombineColumn(myRange As Range)

    Dim cell As Range
    For Each cell In myRange
        If Len(cell) > 0 Then
            CombineColumn = CombineColumn & cell.Value & ","
        End If
    Next cell
    CombineColumn = Left(CombineColumn, Len(CombineColumn) - 1)
    
End Function

Write formula in cell:
Code:
=CombineColumn(A1:A800)

etc.
 
Thanks guys! +rep added
 
Back
Top