+ Reply to Thread
Results 1 to 9 of 9

Extract number from text

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,709

    Extract number from text

    I am looking for a formula to extract a number from text

    Have tried to use formula below but get #value!

    Please Login or Register  to view this content.

    It would be appreciated if someone could provide me with the correct formula to do this
    Attached Files Attached Files

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

    Re: Extract number from text

    Try

    =MID($A1,SEARCH(" Number ",$A1)+8,200)

    SEARCH is not case-sensitive AND it finds the start of the string so add 8

    FIND worked with "NUMBER" rather then "Number"

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,419

    Re: Extract number from text

    Here's another way:

    =TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99),3),99))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: Extract number from text

    If it is always a 12 digit number and at the end of the text, then you could use this:

    =RIGHT(A1,12)

    Note that all the proposed solutions will return text values. If you want the value as a proper number then you need to convert it - this will do it:

    =RIGHT(A1,12) +0

    Hope this helps.

    Pete

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,419

    Re: Extract number from text

    @Pete - I thought of that, but as these are account numbers, I suspect some may start with a 0, so converting to a real number value may not be what is required here.

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

    Re: Extract number from text

    I agree, but with just a single example to go on it is difficult to extrapolate what other data there may be.

    Pete

  7. #7
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,709

    Re: Extract number from text

    Thanks for the help & input

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

    Re: Extract number from text

    A good way of saying thanks is to click on the "star" icon in the bottom left corner of any post that you have found to be helpful, thus Adding to the poster's Reputation.

    Pete

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,419

    Re: Extract number from text

    Thanks 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: 9
    Last Post: 08-20-2020, 05:30 AM
  2. [SOLVED] How to extract number from text
    By Shan54321 in forum Excel General
    Replies: 4
    Last Post: 03-10-2019, 11:23 AM
  3. [SOLVED] Extract certain text dependant on number of characters in text
    By bjoanmark in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-28-2014, 02:57 AM
  4. extract number from text and number cell
    By south in forum Excel General
    Replies: 15
    Last Post: 08-23-2014, 03:28 AM
  5. [SOLVED] Extract text and number from a long text
    By tantcu in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-10-2013, 01:13 PM
  6. Extract Number from text
    By mohd_arastu in forum Excel General
    Replies: 3
    Last Post: 12-17-2011, 01:21 PM
  7. [SOLVED] Extract number from text/number string..
    By nastech in forum Excel General
    Replies: 5
    Last Post: 07-05-2006, 06:25 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