See the image. I want the column to be converted into the row as in the image. Even if there are multiple text or numbers with commas in any single row within the column, then those needs to be considered as duplicates. How do I make the row that I have using a formula?
1 Answer
Try this small user defined function:
Public Function MakeList(rng As Range) As String
Dim c As Collection, r As Range, s As String
Set c = New Collection
For Each r In rng
ary = Split(r.Value, ",")
For Each a In ary
On Error Resume Next
c.Add a, CStr(a)
If Err.Number = 0 Then
MakeList = MakeList & "," & a
Else
Err.Number = 0
End If
On Error GoTo 0
Next a
Next r
MakeList = Mid(MakeList, 2)
End Function
For example:

