+ Reply to Thread
Results 1 to 15 of 15

Extracting Three Numbers Within String

  1. #1
    Registered User
    Join Date
    09-02-2017
    Location
    Arizona
    MS-Off Ver
    2013
    Posts
    8

    Extracting Three Numbers Within String

    Hello,

    I am on a quest to have 3 numbers pulled from a string (example criteria attached). For instance:

    Example String: Egsc, 345, kel, X - CO, P3 - XXB, 546 XXG, 354 BSE

    The result I am looking for is 345. The issue is that the three numbers are not always in the same place, but are always between two commas and the number is always formatted comma, space, number.

    I have attempted many solves for this, including enlisting ChatGPT, however, to no resolve. Any assistance would be appreciated.

    Thank you.
    Attached Files Attached Files
    Last edited by AZJ; 08-02-2023 at 10:21 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Extracting Three Numbers Within String

    Are you still using XL 2013 ? If not please amend your profile accordingly. Newer versions have other functions. Thx

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,098

    Re: Extracting Three Numbers Within String

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2404-17531.20128
    Posts
    1,361

    Re: Extracting Three Numbers Within String

    What version of Excel are you using?
    If things don't change they stay the same

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Extracting Three Numbers Within String

    Here's another one you can use in B2:

    =MID(A2,FIND(", ",A2,FIND("SUVS,",A2)+6)+2,3)

    Copy down as required.

    Note that this "number" will be returned as a text value, rather than a numeric value. If you want it to be a number, just add +0 at the end of the formula.

    Hope this helps.

    Pete

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Extracting Three Numbers Within String

    Quote Originally Posted by CheeseSandwich View Post
    What version of Excel are you using?
    Already asked post #2...

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Extracting Three Numbers Within String

    If you are updated to Excel 365 you can try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and copy down

  8. #8
    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,510

    Re: Extracting Three Numbers Within String

    Just for fun, if you have upgraded to a more recent version, like 365, one way:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    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


  9. #9
    Registered User
    Join Date
    09-02-2017
    Location
    Arizona
    MS-Off Ver
    2013
    Posts
    8

    Re: Extracting Three Numbers Within String

    Hi All,

    Appreciate the responses. We are using Excel 2013.

    Thank you.

  10. #10
    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,510

    Re: Extracting Three Numbers Within String

    We are using Excel 2013.
    Shame, you don't know what you're missing

  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,510

    Re: Extracting Three Numbers Within String

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  12. #12
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,098

    Re: Extracting Three Numbers Within String

    Did any of the suggestions work?

  13. #13
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Extracting Three Numbers Within String

    Mine should work in all versions of Excel.

    Pete

    EDIT: Mind you, it does rely on the text SUVS, being present, and the numbers following after it as in the example data.

  14. #14
    Forum Contributor John Vergara's Avatar
    Join Date
    01-17-2022
    Location
    Colombia
    MS-Off Ver
    365
    Posts
    200

    Re: Extracting Three Numbers Within String

    Hi to everyone!

    Another option could be:
    PHP Code: 
    =AGGREGATE(15,6,--MID(SUBSTITUTE(","&A2,",",REPT(" ",199)),199*ROW($1:$9),199),1
    Blessings!
    A out-of-context text is a pretext.
    Consider adding reputation points to all the people who help you with your question/problem.

  15. #15
    Forum Contributor
    Join Date
    10-22-2022
    Location
    Santa Cruz, Bolivia
    MS-Off Ver
    MSO 365
    Posts
    147

    Re: Extracting Three Numbers Within String

    hi everyone, I allow me to propose another possible solution:

    Please Login or Register  to view this content.
    I hope it result useful.

+ 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. RE: Extracting Certain Numbers from a Text String Containing Several Numbers
    By EduardStoo in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-04-2018, 07:00 PM
  2. extracting numbers from the string
    By essai2008 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2014, 08:39 PM
  3. Extracting numbers from a String?
    By lolgiggleman in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 02-12-2014, 06:16 AM
  4. [SOLVED] extracting numbers from a string of text and numbers
    By ScottLor in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-05-2013, 04:47 PM
  5. Excel 2007 : Extracting Numbers from A String
    By pxoxyx in forum Excel General
    Replies: 6
    Last Post: 04-28-2010, 01:43 AM
  6. Extracting Numbers a from String
    By ratcat in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-25-2009, 11:13 AM
  7. [SOLVED] Extracting numbers of a string
    By Apaxe2000 in forum Excel General
    Replies: 4
    Last Post: 05-12-2006, 11:15 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