In Excel, I have a column which has 50 rows. Now I want to convert these 50 rows into a single cell with comma separated values. Is there a way to do it?
在Excel中,我有一个有50行的列。现在我想将这50行转换为具有逗号分隔值的单个单元格。有办法吗?
1 个解决方案
#1
0
Try this User Defined Function :
试试这个用户定义的功能:
Public Function conkat(rIn As Range) As String
conkat = ""
For Each r In rIn
conkat = conkat & "," & r.Value
Next r
conkat = Mid(conkat, 2)
End Function
used like:
=conkat(A1:A50)
#1
0
Try this User Defined Function :
试试这个用户定义的功能:
Public Function conkat(rIn As Range) As String
conkat = ""
For Each r In rIn
conkat = conkat & "," & r.Value
Next r
conkat = Mid(conkat, 2)
End Function
used like:
=conkat(A1:A50)