![]() |
|
|
|
#1
|
|||
|
|||
|
Is there a formula to sort numbers within a Cell.
Eg cell A1 contains "8 7 20 6 14 3" and I want cell B1 to read "3 6 7 8 14 20" |
|
#2
|
|||
|
|||
|
Code:
Ascending : =TEXT(SUM(SMALL(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1),ROW(INDIRECT("1:"&LEN(A1))))*10^(LEN(A1)-ROW(INDIRECT("1:"&LEN(A1))))),REPT("0",LEN(A1)))
Descending : =TEXT(SUM(LARGE(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1),ROW(INDIRECT("1:"&LEN(A1))))*10^(LEN(A1)-ROW(INDIRECT("1:"&LEN(A1))))),REPT("0",LEN(A1)))
|
|
#3
|
|||
|
|||
|
For my part both formulas (array entered) return #VALUE!
|
|
#4
|
|||
|
|||
|
xor
Hmm ... cant reproduce that here.
|
|
#5
|
|||
|
|||
|
see attached
|
|
#6
|
|||
|
|||
|
Yes, but have you tried your formula on the sequence mentioned by OP.
|
|
#7
|
|||
|
|||
|
Aha ! There I go 'assuming' again ....
![]() Back to the drawing board matey ! |
|
#8
|
|||
|
|||
|
Does michaelst = Briancul ?
Does xor = XOR LX ? a formula solution to a very similar question asked today on another forum https://www.mrexcel.com/forum/excel-...ml#post4808409 a VBA user defined function from over 5 years ago http://www.ozgrid.com/forum/showthre...619#post560619 |
|
#9
|
|||
|
|||
|
NoSparks
Really like that second website. Thanks friend |
|
#10
|
|||
|
|||
|
@NoSparks
Does xor = XOR LX ? No, XOR LX is in a different league. |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sorting page-numbers with ranges (i.e.: 6ff or 7-10 etc.) | roderh | Excel Programming | 4 | 09-02-2016 05:12 AM |
| Sorting Numbers in a Document | rsrasc | Word VBA | 3 | 01-04-2016 11:47 PM |
| Sorting Index According to Page Numbers | mohsen.amiri | Word | 14 | 06-25-2015 09:50 PM |
| Search a cell that contains words and numbers and convert the numbers to metric | Carchee | Excel Programming | 36 | 10-08-2014 03:16 PM |
Sorting paragraph numbers
|
CommDude | Excel | 1 | 01-02-2011 04:38 PM |