在Excel中,我有一个有50行的列。现在我想将这50行转换为具有逗号分隔值的单个单元格。有办法吗?
答案 0 :(得分:0)
试试用户定义的功能:
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
用过:
= conkat(A1:A50)
答案 1 :(得分:0)
如果您具有Office 365 Excel,则可以使用TEXTJOIN():
=TEXTJOIN(",",TRUE,A1:A50)