+ Reply to Thread
Results 1 to 10 of 10

Sorting Text Alphabetically

  1. #1
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Sorting Text Alphabetically

    Looking for formula to extract values from G2:G10 and sort in ascending order in A17:A27 and still keep the blanks when values are extracted. See attached sample file

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Sorting Text Alphabetically

    If you had retained the formulas in A17 etc. and simple sorted the data in I by product (I assume you do want sort within product) i.e, selected the 4 rows for Apples and sorted them, problem solved!

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Sorting Text Alphabetically

    I headed Column F as "Code"

    Then Custom Sort

    Code ==>Z to A
    Product ==> Z to A
    Nutrition ==> A to Z
    Facts ==> A to Z

    Is this the order required ???

  4. #4
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Sorting Text Alphabetically

    Need a formula to sort instead of using the manual sort.

    Thanks

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Sorting Text Alphabetically

    How is a formula going to sort the following ....???

    Reduce cancer risk
    Reduce diabetes

    At best you will need a purpose-written VBA macro: so why not sort your input table .

  6. #6
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Sorting Text Alphabetically

    Only need values in G2:G10 sorted alphabetically.

    Thanks

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Sorting Text Alphabetically

    Quote Originally Posted by JohnTopley View Post
    How is a formula going to sort the following ....???

    Reduce cancer risk
    Reduce diabetes
    Like this...

    Data Range
    A
    B
    1
    Random
    Sorted Ascending
    2
    Reduce diabetes
    Reduce cancer risk
    3
    Reduce cancer risk
    Reduce diabetes


    This array formula** entered in B2 and copied down:

    =INDEX(A$2:A$3,MATCH(LARGE(COUNTIF(A$2:A$3,">"&A$2:A$3),ROWS(B$2:B2)),COUNTIF(A$2:A$3,">"&A$2:A$3),0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Sorting Text Alphabetically

    Tony Valko: great! still looking for a formula to sort G2:G12 but keep blank rows. Thanks

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: Sorting Text Alphabetically

    You have sort G2 to I12 as a group otherwise the H and I columns will not match column G.

  10. #10
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Sorting Text Alphabetically

    John Topley: I can use helper column to make it match. Just looking to sort G2:G12 and still keep blank rows as is.

    Thanks

+ 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. Sorting Column Alphabetically
    By red1975 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-26-2014, 12:10 PM
  2. Sorting MCQ questions alphabetically
    By kokoman789 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-08-2013, 06:26 PM
  3. Formula in sorting alphabetically
    By felixpanganiban in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-11-2012, 01:56 PM
  4. sorting sheets alphabetically
    By KIRSTA1967 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-23-2012, 04:05 AM
  5. Replies: 7
    Last Post: 07-02-2012, 07:23 PM
  6. Sorting Button (form control) alphabetically based on text label
    By DTK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2010, 08:48 PM
  7. Sorting certain sheets alphabetically
    By SOS in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-29-2008, 11:21 AM
  8. Sorting Alphabetically
    By Jack in forum Excel General
    Replies: 1
    Last Post: 01-15-2005, 05:06 PM

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