+ Reply to Thread
Results 1 to 4 of 4

Remove non alphanumeric data from cells

  1. #1
    Registered User
    Join Date
    05-05-2008
    Posts
    16

    Remove non alphanumeric data from cells

    I have a spreadsheet that we are converting into a database.

    There is an invoice number field. In the new database, we do not want non alphanumeric data in these fields. The worksheet source (obviously) has them. For example, we have 1598-07 or IMG-62-45P or 07111 562 (that last one has a space.

    So what I need is someway to eliminate non alphanumeric data and spaces so each of the above examples will look like 159807, IMG6245P and 07111562.

    I thought this would be an easy one but I can't find any info on this.

    Can someone help me once again?

  2. #2
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    have you tried find and replace?
    Ed
    _____________________________
    Always learning, but never enough!
    _____________________________

  3. #3
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good afternoon chconnol

    Put this macro in a module, highlight the data you want to clean and go to Tools > Macro > Macros, Run :

    Please Login or Register  to view this content.
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Remove non alphanumeric data from cells

    If the only undesirable characters are spaces and dashes....
    perhaps this:

    With
    A1: (text....eg 1598-07 IMG)

    This formula removes those chars:
    Please Login or Register  to view this content.
    Using the above example,
    the formula returns: 159807IMG

    Does that help?
    Post back if you have more questions.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

+ 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