+ Reply to Thread
Results 1 to 6 of 6

Extract numbers from string

  1. #1
    Registered User
    Join Date
    01-20-2011
    Location
    Bulgaria
    MS-Off Ver
    Excel 2003
    Posts
    34

    Extract numbers from string

    I have a column in which in every row have some text ending wwith numbers. Example
    abc112
    defg103
    www2034
    etc
    How could I extract the numbers in next colums (or any other). Exaple

    abc 112
    defg 103
    www 2034

    If is non clear attaching sample

    Thanks in advance
    Attached Images Attached Images

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,055

    Re: Extract numbers from string

    I don't know why is so hard to attach excel workbook instead of picture

    Edit: If you want #N/A rather then 0 in case there is no number at the end of the word remove &0 and /10 from formula in D1

    =LOOKUP(99^99; --RIGHT(A1&0; ROW($A$1:$A$30)))/10
    Attached Files Attached Files
    Last edited by zbor; 02-28-2011 at 08:34 AM.
    Never use Merged Cells in Excel

  3. #3
    Registered User
    Join Date
    01-20-2011
    Location
    Bulgaria
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Extract numbers from string

    Thanks. This however works only for whole nimbers. If I apply it tonumbers with decimal point, I get something different. It is seen from the the attached file. How could solved this problem?
    Attached Images Attached Images

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,055

    Re: Extract numbers from string

    Maybe this helps:
    Attached Images Attached Images

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Extract numbers from string

    @zbor
    I like that...apparently the OP didn't get the "picture"
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,055

    Re: Extract numbers from string


+ 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