Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-22-2017, 01:38 AM
michaelst michaelst is offline Sorting numbers within cell Windows 10 Sorting numbers within cell Office 2000
Novice
Sorting numbers within cell
 
Join Date: Apr 2017
Posts: 1
michaelst is on a distinguished road
Default Sorting numbers within cell


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"
Reply With Quote
  #2  
Old 04-22-2017, 10:57 AM
Logit Logit is offline Sorting numbers within cell Windows 10 Sorting numbers within cell Office 2007
Expert
 
Join Date: Jan 2017
Posts: 587
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

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)))
Paste formula, then press CTRL / SHIFT / ENTER at the same time.
Reply With Quote
  #3  
Old 04-22-2017, 11:28 AM
xor xor is offline Sorting numbers within cell Windows 10 Sorting numbers within cell Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,100
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

For my part both formulas (array entered) return #VALUE!
Reply With Quote
  #4  
Old 04-22-2017, 11:48 AM
Logit Logit is offline Sorting numbers within cell Windows 10 Sorting numbers within cell Office 2007
Expert
 
Join Date: Jan 2017
Posts: 587
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

xor

Hmm ... cant reproduce that here.

Reply With Quote
  #5  
Old 04-22-2017, 11:53 AM
Logit Logit is offline Sorting numbers within cell Windows 10 Sorting numbers within cell Office 2007
Expert
 
Join Date: Jan 2017
Posts: 587
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

see attached
Attached Files
File Type: xlsx Ascend Descend.xlsx (8.8 KB, 17 views)
Reply With Quote
  #6  
Old 04-22-2017, 11:59 AM
xor xor is offline Sorting numbers within cell Windows 10 Sorting numbers within cell Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,100
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

Yes, but have you tried your formula on the sequence mentioned by OP.
Reply With Quote
  #7  
Old 04-22-2017, 01:22 PM
Logit Logit is offline Sorting numbers within cell Windows 10 Sorting numbers within cell Office 2007
Expert
 
Join Date: Jan 2017
Posts: 587
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

Aha ! There I go 'assuming' again ....

Back to the drawing board matey !
Reply With Quote
  #8  
Old 04-22-2017, 03:58 PM
NoSparks NoSparks is offline Sorting numbers within cell Windows 7 64bit Sorting numbers within cell Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

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
Reply With Quote
  #9  
Old 04-22-2017, 04:56 PM
Logit Logit is offline Sorting numbers within cell Windows 10 Sorting numbers within cell Office 2007
Expert
 
Join Date: Jan 2017
Posts: 587
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

NoSparks

Really like that second website.

Thanks friend
Reply With Quote
  #10  
Old 04-22-2017, 10:51 PM
xor xor is offline Sorting numbers within cell Windows 10 Sorting numbers within cell Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,100
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

@NoSparks

Does xor = XOR LX ?

No, XOR LX is in a different league.
Reply With Quote
Reply



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 numbers within cell Sorting paragraph numbers CommDude Excel 1 01-02-2011 04:38 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft