I have a string of text that contains cells with multiple country codes. They all contain commas in-between each code.
I need a function that will sort these in alphabetical order. I have a macro (below) but, a function works better for me.
Dim sString As String
Dim sTemp As String
Dim iNoCommas As Integer
sString = Range("C4").Value
' Evaluate where the commas are positioned
' in order to transfer all entries in the
' string within array
For i = 1 To Len(sString)
sTemp = Mid(sString, i, 1)
If sTemp Like "," Then
iNoCommas = iNoCommas + 1
' Update information in cell A12
Range("C4").Value = SortArray(sString, iNoCommas)