+ Reply to Thread
Results 1 to 8 of 8

Sort Text ascending / descending from a cell

  1. #1
    Registered User
    Join Date
    11-12-2017
    Location
    London
    MS-Off Ver
    2007
    Posts
    4

    Sort Text ascending / descending from a cell

    Hi There,

    Need help in finding a formula to arrange text ascending and descending from each cell.

    Eg: Cell A1 has "EDDIE" , results in cell B1 (ascending) should be"DDEEI" and results in cell C1 (descending ) should be "IEEDD"

    Thanks

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Sort Text ascending / descending from a cell

    Hi eddiedhs. Welcome to the forum.

    I would be surprised if this can be done without VBA.

    Try this user defined function by tigeravatar. If you are not familiar with how to install VBA code see the instructions following this code.

    Please Login or Register  to view this content.
    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    Then try array entering this formula in B1. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Change SMALL to LARGE to reverse the order.
    Dave

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Sort Text ascending / descending from a cell

    .
    Pure VBA method :

    Please Login or Register  to view this content.
    Website Resource:

    https://windowssecrets.com/forums/sh...ell-(excel-xp)

  4. #4
    Registered User
    Join Date
    11-12-2017
    Location
    London
    MS-Off Ver
    2007
    Posts
    4

    Re: Sort Text ascending / descending from a cell

    Hi FlameRetired ,

    Thanks for this, but i cannot get it work
    Edd.xlsm

  5. #5
    Registered User
    Join Date
    11-12-2017
    Location
    London
    MS-Off Ver
    2007
    Posts
    4

    Re: Sort Text ascending / descending from a cell

    Hi Logit,

    Thanks, but i feel the string is broken??

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Sort Text ascending / descending from a cell

    .
    No problems here. Works as it should :

    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Sort Text ascending / descending from a cell

    Quote Originally Posted by eddiedhs View Post
    Hi FlameRetired ,

    Thanks for this, but i cannot get it work
    Attachment 547551
    Your attached has the strings in proper case. The original example was in upper case. Try array entering this.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    11-12-2017
    Location
    London
    MS-Off Ver
    2007
    Posts
    4

    Re: Sort Text ascending / descending from a cell

    thanks a ton, it works now

+ 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. VBA Code to sort in ascending AND descending order
    By infinitecables in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2017, 11:10 AM
  2. [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
  3. Can you sort a chart out in Ascending/Descending Order
    By dandavis1 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 11-26-2010, 09:52 AM
  4. one macro to sort text in ascending and descending order
    By jpruffle in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-13-2008, 10:24 PM
  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

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