Hi, please need advice, i don't know what i'm doing wrong
I'm extracting strings from single cells.
These Cells contain digits Numbers including front zero.
(Cell C15:C21, T15:T21, etc,etc)
I need to Extract from original Cell and copy in to a Single Cell AO3 (Down,)
-with numbers Sorted (least to most)
-with "-" (dash) between each numbers and
-Leading zero, But i excel doe's the job partially (well is not excel, it's me, 
I need to get this result :
Cell
Row
AO3 02-08-11-16-25-28
AO4 02-08-16-18-30
AO5 02-05-08-09-12-16
AO6 02-08-16-18-30-33
AO7 02-06-08-16-23-32
But i'm getting with extra "dash" in some of the string, also not sorted and not leading zero.
I set the Cell properties to accept leading zero... (do i'm missing something?)
I'm Getting this Undesired result, instead :
(scramble)
Cell
Row
AO3 11-16-2-25-28-8
AO4 16-18-2-30-8
AO5 12-16-2-5-8-9
AO6 -16-18-2-30-33-8
AO7 -16-2-23-32-6-8
I have a VB code and using Sortuniq
Function SortUniq(delim As String, ParamArray a()) As String
Dim r As Range, e, x
With CreateObject("System.Collections.ArrayList")
For Each x In a
For Each r In x
For Each e In Split(r.Value, delim)
If Not .Contains(Trim$(e)) Then .Add Trim$(e)
Next
Next
Next
.Sort
SortUniq = Join$(.ToArray, delim)
End With
End Function
=(TRIM(sortuniq("-",C15:C21,S15:S21)))
=(TRIM(sortuniq("-",C15:C21,T15:T21)))
=(TRIM(sortuniq("-",C15:C21,U15:U21)))
=(TRIM(sortuniq("-",C15:C21,V15:V21)))
=(TRIM(sortuniq("-",C15:C21,W15:W21)))
Thank you
Bookmarks