+ Reply to Thread
Results 1 to 6 of 6

extracting a term from a group of text so I can sort

  1. #1
    Registered User
    Join Date
    10-05-2016
    Location
    orange, ca
    MS-Off Ver
    0365
    Posts
    97

    extracting a term from a group of text so I can sort

    Hello all

    In the provided sample, I sorted column AH than AI by number as you see.

    Next I wanted to sort by column C..the issue I am having is column C isn't setup to sort the way I want. I highlighted in blue what I want column C to sort by. But the issue is if I sort by column C, it will sort by 1st/2nd or whatever is at the beginning text of column C.

    I thought about using a helper column with the search function or find function than sort the helper column, but the text I actually want to sort by won't always be in the same position in column C nor will it always follow the term 1st/2nd or 3rd (for example row 22 column C begins with t2 rather than row 18 column C begins with 1st t2).

    The term I want to sort by in column C will always contain following terms...1 ext,t2,t3,t4...and so on or 1pt,2pt,3pt,4pt & so on. I highlighted in blue these in some of the rows in the provided sample.

    So I am wondering what formula I can use to accomplish the sort in Column C the way I want to or perhaps another method such as a different way to sort or the like.

    Please let me know any further clarification that is needed.
    Attached Files Attached Files
    Last edited by lar9149; 07-08-2021 at 07:33 PM.

  2. #2
    Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2016,2019
    Posts
    240

    Re: extracting a term from a group of text so I can sort

    Can you upload a sample workbook with the structure and the content you described?
    Diana Tanase

  3. #3
    Registered User
    Join Date
    10-05-2016
    Location
    orange, ca
    MS-Off Ver
    0365
    Posts
    97

    Re: extracting a term from a group of text so I can sort

    my bad, its uploaded

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    23,355

    Re: extracting a term from a group of text so I can sort

    The UDF extracts the sort "keys" listed in your post: I am sure there are more but easily added.

    Please Login or Register  to view this content.
    results in column D

    =getsortkeys(C6)
    Attached Files Attached Files
    Last edited by JohnTopley; 07-08-2021 at 04:12 PM.

  5. #5
    Registered User
    Join Date
    10-05-2016
    Location
    orange, ca
    MS-Off Ver
    0365
    Posts
    97

    Re: extracting a term from a group of text so I can sort

    Quote Originally Posted by JohnTopley View Post
    The UDF extracts the sort "keys" listed in your post: I am sure there are more but easily added.

    Please Login or Register  to view this content.
    results in column D

    =getsortkeys(C6)
    That is really really awesome John Topley, it works and so simple (in usage not in difficulty of creation I am sure)!! Thank you X 1000!

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    23,355

    Re: extracting a term from a group of text so I can sort

    You're welcome. Thank you for the rep.

+ 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. Replies: 1
    Last Post: 04-18-2014, 05:54 PM
  2. Replies: 2
    Last Post: 12-16-2013, 01:12 PM
  3. Replies: 3
    Last Post: 10-21-2013, 11:36 PM
  4. Replies: 1
    Last Post: 10-19-2012, 07:55 AM
  5. Sort a group of names based on the group total
    By ron2k_1 in forum Excel General
    Replies: 3
    Last Post: 08-13-2010, 01:16 PM
  6. Extracting text from a group of cells
    By hoopz in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-31-2006, 05:35 PM
  7. [SOLVED] Alpha sort, but some cells sorted by phantom term?
    By sinkhole in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-11-2006, 01:35 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