+ Reply to Thread
Results 1 to 6 of 6

Extract numbers only from a cell containing text also.

  1. #1
    Forum Contributor
    Join Date
    03-30-2007
    Location
    London, UK
    MS-Off Ver
    Microsoft Office 2007
    Posts
    317

    Smile Extract numbers only from a cell containing text also.

    Hi Guys,

    I have a cell that I need to clean up. It contains text and numbers.

    What I want to know is this, can I have a formula that will extract just the numbers and not the text?

    For example if cell B2 = 'Ref No. 123456'. Could I just extract the '123456'?

    Thanks in advance.
    Best Regards.

    Michael
    -----------------------------------
    Windows Vista, Microsoft Office 2007

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Try this,

    =RIGHT(A1,LEN(A1)-FIND(". ",A1,1)-1)
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Contributor
    Join Date
    03-30-2007
    Location
    London, UK
    MS-Off Ver
    Microsoft Office 2007
    Posts
    317

    Smile

    Wow! That was lightning quick Oldchippy. Thank you so much and a much better formula then the one i used.

    I just used: =RIGHT(A1,7). However your method is better as it looks for the punctuation mark and space and counts from there.

    This works perfect!

    Thank you so much for your rapid response I reallly appreciate it.

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    No problem - thanks for the feedback

  5. #5
    Registered User
    Join Date
    12-04-2013
    Location
    Colorado
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Extract numbers only from a cell containing text also.

    Excellent formula and the first one that has gotten me close to what I am trying to do. I am also trying to extract numbers from data. The aforementioned formula worked, but is there any way to tweak it to remove any alpha characters after the number?For example:
    I am using this formula
    =RIGHT(E86,LEN(E86)-FIND("E ",E86,1)-1)

    in cell E94 the cell has "PO Line 8 de"

    I am looking to only count two spaces after "E ". An ISNUMBER formula would probably work as well (but to be honest, I can't get those to do anything but display t or f). I'd appreciate any help I can get on this, thanks in advance!

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Extract numbers only from a cell containing text also.

    acfrogg,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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