+ Reply to Thread
Results 1 to 2 of 2

extract numbers & / only from a string

  1. #1
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    extract numbers & / only from a string

    Hi
    could anyone come up with a quick solution to just return numbers or "/" from a string of text

    ie 0233456/2 = 0233456/2
    034hfn34 = 03434
    02345(MI) = 02345
    RH03FHN = 03

    I can remove the text or numbers but cant seem to manage to keep the /
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: extract numbers & / only from a string

    This array formula works with your first example:

    =MID(LEFT(A2,MATCH(1,-MID(A2,ROW(A$1:A$99),1),1)),MIN(SEARCH(ROW(A$1:A$10)-1,A2&1234567890)),99)

    What are you using for the others?

    Maybe you could use =IF(ISNUMBER(SEARCH("/",A1)),myformula,yourformula)
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

+ 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. How to extract numbers from a string
    By Ian99099 in forum Excel General
    Replies: 4
    Last Post: 02-28-2015, 11:22 AM
  2. [SOLVED] Extract string into numbers (Solved by Benishiryo)
    By hoandt in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-21-2012, 01:38 PM
  3. Extract numbers from string
    By grey_hair in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-05-2011, 01:54 AM
  4. Extract numbers from string
    By gavster in forum Excel General
    Replies: 2
    Last Post: 11-18-2010, 12:29 PM
  5. Extract last 4 numbers from string
    By DarkBeer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-15-2010, 11:16 AM
  6. Extract Numbers from a string
    By dugong in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-21-2008, 06:21 AM
  7. [SOLVED] Extract numbers from a string ?
    By Jello in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-03-2005, 07:06 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