![]() |
|
#5
|
||||
|
||||
|
Would a user-defined function be OK?
2022-01-27_204200.png Code:
Function CellSort(cll)
x = Split(cll, ",")
For i = LBound(x) To UBound(x) - 1
For j = LBound(x) To UBound(x) - 1 - i
If CDec(x(j)) > CDec(x(j + 1)) Then temp = x(j): x(j) = x(j + 1): x(j + 1) = temp
Next j
Next i
CellSort = Join(x, ",")
End Function
|
| Tags |
| excel 2010, sort |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sort/select by duplicates containing cell colour | JamesTheNoob | Excel | 3 | 04-08-2019 09:11 AM |
| Sort numbers in Ascending order | btserver | Excel | 5 | 03-16-2019 07:54 AM |
Cell references don't change on sort
|
gebobs | Excel | 3 | 07-23-2015 05:14 AM |
| Search a cell that contains words and numbers and convert the numbers to metric | Carchee | Excel Programming | 36 | 10-08-2014 03:16 PM |
| Trying to autofilter 8-10 rows of numbers to sort in a group | Jack-P-Winner | Excel | 0 | 11-25-2013 10:55 PM |