+ Reply to Thread
Results 1 to 3 of 3

Sort Ascending & Descending Number within a Cell

  1. #1
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Tehran, Iran
    MS-Off Ver
    2019 v2306
    Posts
    145

    Sort Ascending & Descending Number within a Cell

    Hello,

    I need a formula for Ascending & Descending Number within a Cell

    For Example :
    A1: 6249
    A2 : Ascending : 2469
    A3 : Descendig : 9642

    another one :

    A1 : 3576
    Ascending : 3567
    Descending : 7653

    Thank you in advance for your reply
    Last edited by soubasa; 05-08-2020 at 08:14 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Sort Ascending & Descending Number within a Cell

    Here is an array formula, number to order is in D3.

    =TEXTJOIN("",TRUE,LARGE(--MID(D3,ROW(A1:INDEX(A:A,LEN(D3))),1),ROW(A1:INDEX(A:A,LEN(D3)))))

    Change LARGE to SMALL to get reverse order
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Sort Ascending & Descending Number within a Cell

    Please try at
    A2
    =SUMPRODUCT(LARGE(--MID(A1,{1,2,3,4},1),{1,2,3,4})*10^{0,1,2,3})

    A3
    =SUMPRODUCT(small(--MID(A1,{1,2,3,4},1),{1,2,3,4})*10^{0,1,2,3})

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Sort ascending and/or descending based of headers
    By waimea in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-29-2018, 04:48 PM
  2. [SOLVED] Automatically Sort Ascending to Descending...
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-08-2017, 10:17 AM
  3. Sort Text ascending / descending from a cell
    By eddiedhs in forum Excel General
    Replies: 7
    Last Post: 11-15-2017, 05:07 PM
  4. [SOLVED] Fix Sub row label instead of using Sort by Ascending or Descending
    By so_nice3 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-18-2014, 02:21 AM
  5. sort function - from ascending to descending
    By jimmyp in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-14-2006, 02:15 PM
  6. [SOLVED] Help on autofilter sort ascending and descending!
    By crapit in forum Excel General
    Replies: 2
    Last Post: 12-12-2005, 10:45 AM
  7. [SOLVED] Sort other than by alphabetical ascending/ descending
    By Melissa in forum Excel General
    Replies: 6
    Last Post: 09-02-2005, 03:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1