![]() |
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. |
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 |
Digits in ascending order ?
Thank You so much...
|
All times are GMT +1. The time now is 01:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com