+ Reply to Thread
Results 1 to 11 of 11

Extract the letters after a word

  1. #1
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    Extract the letters after a word

    In column A I have fruits with a letter after the fruit (not always a letter and it may vary in length).

    So example

    Apple bt
    Water Melon c
    Pear w
    Orange
    Grape q
    Plum esq

    In column B I want to extract the abbreviation after the fruit. How is best to do so with a formula?

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Extract the letters after a word

    Hi.

    How will we instruct Excel to know if the desired extraction is present or not when the fruit is made up of more than one word?

    For example, if you had just "Water Melon", i.e. without the "c" at the end (by the way, I always thought this was one word, i.e. "Watermelon", not two), how do we know that "Melon" is not to be extracted, since it is actually just part of the fruit name?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    Re: Extract the letters after a word

    The fruit name may not always be one word after. So in my example I will have Apple bt in row A1, in C1 I could have the fruit name (apple). What is the best way for B1 to show just the "bt"

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Extract the letters after a word

    Quote Originally Posted by cmb80 View Post
    The fruit name may not always be one word after. So in my example I will have Apple bt in row A1, in C1 I could have the fruit name (apple). What is the best way for B1 to show just the "bt"
    How does that answer my question?

    Regards

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Extract the letters after a word

    This could work (except for Orange) =TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",125)),125))
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Extract the letters after a word

    Quote Originally Posted by Sambo kid View Post
    This could work (except for Orange)
    Which is why I asked my question!

  7. #7
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Extract the letters after a word

    It can be done if you have the complete list of fruits available in a column somewhere in the file.

    Can you post a sample excel with some more examples?

  8. #8
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    Re: Extract the letters after a word

    Hi all, thanks for the replies - I have found a workaround using Vlookup and Mid

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Extract the letters after a word

    This would work, though a bit long winded:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This variation on Sambo kid's solution also works, including for Orange:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Still shorter than mine



    We've shown you ours. Now care to share your solution?


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  10. #10
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Extract the letters after a word

    TMS, nice, I didn't have the time to work it out before leaving for work but I was trying some combo like how you tweaked what I gave him. For some reason I cannot give you a rep for it but, nice job.

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Extract the letters after a word

    No worries. Probably because you gave me rep a few days ago

+ 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] I need to extract first 4 letters from a cell
    By cara164 in forum Excel General
    Replies: 4
    Last Post: 11-17-2014, 02:23 PM
  2. [SOLVED] Extract first or first two letters from postcode
    By gilgil2 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-09-2014, 03:13 PM
  3. Need to extract only numbers after certain letters
    By Chippi in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-18-2014, 02:34 PM
  4. [SOLVED] Extract letters before first number
    By j.lancaster1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-21-2012, 08:49 PM
  5. Extract a text from word and place it en excel or word?
    By Elegidos in forum Word Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2009, 06:14 AM
  6. [SOLVED] Extract bold letters in a cell
    By hbamse in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-21-2006, 04:40 AM
  7. RE: Extract bold letters in a cell
    By Stefi in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-20-2006, 10:55 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