Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Digits in ascending order ?
Hello,
Anyone knows how to sort digits in ascending order ? Example : Cell A1 = 3176 Cell A2 = 1367 Cell A1 = 704182 Cell A2 = 012478 Thank You. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Digits in ascending order ?
Hello,
I suggest to take this UDF: Option Explicit Function sort_digits(s As String) As String Dim a(0 To 9) As Long, i As Long For i = 1 To Len(s) a(Mid(s, i, 1)) = a(Mid(s, i, 1)) + 1 Next i For i = 0 To 9 sort_digits = sort_digits & String(a(i), Chr(Asc("0") + i)) Next i End Function HTH, Bernd |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Digits in ascending order ?
Thank You so much...
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot Table Ascending Order of Row Field | Excel Discussion (Misc queries) | |||
Changing the auto fill order from ascending to descending | Excel Discussion (Misc queries) | |||
sorting number in ascending order | Excel Discussion (Misc queries) | |||
graph displayed in ascending order of value? | Charts and Charting in Excel | |||
Graph values in ascending order | Excel Discussion (Misc queries) |