+ Reply to Thread
Results 1 to 7 of 7

Removing non numeric and special characters

  1. #1
    Registered User
    Join Date
    10-09-2014
    Location
    switzerland
    MS-Off Ver
    2010
    Posts
    15

    Removing non numeric and special characters

    Dear all

    im looking for an formula which will remove all non numeric in a cell and also "some" special characters. lets say i have in cell A1 following value: 0206-00269149.70M and i need it without "-" and "M" but keeps the "." where it is. A formula which could be edited with more special characters if needed. Final Value should be: 020600269149.70


    I found a few formulas online, but those are almost all just where it removes all non numeric values and that would work for me.

    Please assist on above - every info is much appreciated!

    many thanks!
    Last edited by katu; 09-17-2015 at 08:53 AM.

  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: Removing non numeric and special characters

    Try this

    =SUBSTITUTE(SUBSTITUTE(A1,"-",""),"M","")

    Data Range
    A
    B
    1
    0206-00269149.70M
    020600269149.70
    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
    Registered User
    Join Date
    10-09-2014
    Location
    switzerland
    MS-Off Ver
    2010
    Posts
    15

    Re: Removing non numeric and special characters

    Thanks Sir! Much appreciated!

    Just one more: how would i do it if i had to substitute more then just "-" and "M"? is it necessary to add (SUB for all single character? lets say i have to exclude the whole alphabet?

  4. #4
    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: Removing non numeric and special characters

    Quote Originally Posted by katu View Post
    Thanks Sir! Much appreciated!

    Just one more: how would i do it if i had to substitute more then just "-" and "M"? is it necessary to add (SUB for all single character? lets say i have to exclude the whole alphabet?
    Yes, you would have to add more SUBSTITUTES or you would have to look for a vba solutions.

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Removing non numeric and special characters

    This will extract the numbers from text regardless of the text that contains the number.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    A
    B
    1
    this value 123.456 is in the middle @#$#@$#@$%#!! 123.456
    2
    The number 20m is really text 20
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    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: Removing non numeric and special characters

    You can also get this done with this formula

    =SUBSTITUTE(LEFT(A1,LOOKUP(1,-MID(A1,ROW(A$1:A$99),1),ROW(A$1:A$99))),"-","")

    Data Range
    A
    B
    1
    0206-00269149.70M
    020600269149.70
    2
    065456-456878.84PP
    065456456878.84
    3
    02-326578988.54LLL
    02326578988.54

  7. #7
    Registered User
    Join Date
    10-09-2014
    Location
    switzerland
    MS-Off Ver
    2010
    Posts
    15

    Re: Removing non numeric and special characters

    ok, got you! and regarding vba, im just getting into xls will take that as a new challenge once i settle in xls

    and thanks for the support!!!

+ 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. Removing special characters from time format
    By ajithkumar in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-13-2014, 05:11 AM
  2. Removing special characters
    By sathishkm in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2014, 12:53 AM
  3. [SOLVED] VBA removing special characters
    By vnzerem in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-21-2014, 11:55 AM
  4. [SOLVED] Formula for removing special characters.
    By alexgempesaw in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-15-2013, 01:31 AM
  5. Removing Non-numeric characters from selected cells
    By glen.comerford in forum Excel General
    Replies: 1
    Last Post: 11-21-2010, 04:14 PM
  6. [SOLVED] Removing Non-Numeric Characters - Automatically - How?
    By emerald in forum Excel General
    Replies: 6
    Last Post: 04-04-2006, 03:10 PM
  7. Removing Non-Numeric Characters
    By GlenS in forum Excel General
    Replies: 5
    Last Post: 10-12-2005, 06:05 AM

Tags for this Thread

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