+ Reply to Thread
Results 1 to 13 of 13

Extracting numbers from text in excel

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

    Extracting numbers from text in excel

    Looking for formula to extract numbers only from text values in excel. Non-array formula preferred.

    Sample file attached.
    Attached Files Attached Files

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Extracting numbers from text in excel

    Enter in B2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1 Text Number
    2 INR:1 1
    3 INR:2 2
    4 INR:3 3
    5 INR:4 4
    6 INR:5 5
    7 INR:6 6
    8 INR:7 7
    9 INR:8 8
    10 INR:9 9
    11 INR:10 10
    12 INR:11 11
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Extracting numbers from text in excel

    Hi,In case all your text is in the same format - this formula in B2 should help:
    Please Login or Register  to view this content.

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

    Re: Extracting numbers from text in excel

    Here's another one...

    Data Range
    A
    B
    1
    Text
    Number
    2
    INR:1
    1
    3
    INR:2
    2
    4
    INR:3
    3
    5
    INR:4
    4
    6
    INR:5
    5
    7
    INR:6
    6
    8
    INR:7
    7
    9
    INR:8
    8
    10
    INR:9
    9
    11
    INR:10
    10


    This formula entered in B2 and copied down:

    =--MID(A2,5,10)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2021
    Posts
    5,957

    Re: Extracting numbers from text in excel

    Or try this ...

    =--REPLACE(A2,1,FIND(":",A2),"")

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

    Re: Extracting numbers from text in excel

    Or try this ...

    =--TRIM(RIGHT(SUBSTITUTE(A1,":",REPT(" ",50)),40))


  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Extracting numbers from text in excel

    Quote Originally Posted by Tony Valko View Post
    Or try this ...

    =--TRIM(RIGHT(SUBSTITUTE(A1,":",REPT(" ",50)),40))

    When converting text to numeric values you don't need to use TRIM function. The double unary operator (--) will remove spaces anyway.

    =--RIGHT(SUBSTITUTE(A2,":",REPT(" ",50)),40)

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

    Re: Extracting numbers from text in excel

    Or try this...

    =LOOKUP(1E100,--RIGHT(A1,ROW(INDIRECT("1:"&LEN(A1)))))


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

    Re: Extracting numbers from text in excel

    Or try this ...

    =LOOKUP(9.99999999999999E+307,--RIGHT(A1,ROW(INDIRECT("1:"&LEN(A1)))))


  10. #10
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Extracting numbers from text in excel

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

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

    Re: Extracting numbers from text in excel

    Or try this ...

    =LOOKUP(9.99999999999999E+307,--MID(A1,MIN(FIND({1,2,3,4,5,6,7,8,9,0},A1&"0123456789")),ROW(INDIRECT("1:"&LEN(A1)))))


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

    Re: Extracting numbers from text in excel

    Another approach, that doesn't use a formula:

    Copy cells A2:A123 across into column B. With the cells still highlighted, do CTRL-H (Find & Replace), then:

    Find What: INR:
    Replace with: leave blank
    Click Replace all

    You might want to change the formatting (horizontal alignment) to General.

    Hope this helps.

    Pete

  13. #13
    Registered User
    Join Date
    07-08-2016
    Location
    USA
    MS-Off Ver
    Office 365, Office 2016 for PC & Mac, Office 2013, Office 2011 Mac
    Posts
    80

    Re: Extracting numbers from text in excel

    Anther non-formula method:

    Data→Text to columns→Delimiter Other→:
    or
    Data→Text to columns→Fixed→Move the slider in between : and the number

    DMG

+ 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] Extracting numbers from text?
    By shiftyspina in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-15-2014, 11:10 AM
  2. [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
  3. Extracting numbers and text from inconsistent text/number formatted string
    By Brandivil in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-25-2013, 01:46 PM
  4. Extracting Text and Numbers
    By mcmuney in forum Excel General
    Replies: 1
    Last Post: 01-12-2011, 06:35 PM
  5. Replies: 17
    Last Post: 03-03-2010, 06:55 PM
  6. Extracting numbers from text
    By bmind in forum Excel General
    Replies: 6
    Last Post: 02-23-2010, 11:16 PM
  7. Extracting numbers from text
    By The Boondock Saint in forum Excel General
    Replies: 3
    Last Post: 06-09-2005, 10:05 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