+ Reply to Thread
Results 1 to 3 of 3

Removing nonnumbers in a string

  1. #1
    Registered User
    Join Date
    04-18-2006
    Posts
    11

    Removing nonnumbers in a string

    Is there a way to take out all characters that are not numbers. Example:
    42/75C32 would need to be 427532
    175-22.5X16 RDS would go to 17522516

    Thanks for your help!

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Removing nonnumbers in a string

    You can download a free addin from here: Morefunc and apply formula:

    =REGEX.SUBSTITUTE(A1,"[^0-9]","")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Removing nonnumbers in a string

    Another way using a UDF:

    Paste this in the VB editor (ALT+F11, Insert|Module)

    Please Login or Register  to view this content.
    and then apply formula in workbook:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER not just ENTER

+ 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