+ Reply to Thread
Results 1 to 2 of 2

Removing Non-numeric characters from selected cells

  1. #1
    Registered User
    Join Date
    11-21-2010
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    5

    Thumbs down Removing Non-numeric characters from selected cells

    Hey,

    I was working on a script which removes all non-numeric characters from the selected cells (apart from ".") The numbers could have decimal places. Complication: Some cells could start with a "-" and are therefore incorrectly interpreted as formulae. It would be great if anyone could help!

    Cheers!

  2. #2
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Removing Non-numeric characters from selected cells

    Hi,

    One method would be to temporarily use a Find and Replace on the data in question, run your macro and then remove the Replace string,
    i.e. Find "-", replace it with say "zzz-", then after the macro replace "zzz-" with "-" again.

    HTH

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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