+ Reply to Thread
Results 1 to 6 of 6

Remove hyphens

  1. #1
    Forum Contributor
    Join Date
    03-24-2005
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    378

    Remove hyphens

    We get a CSV sheet from a client with social security and account numbers that have hyphens in them. We want to strip the hyphens and then import the sheet into an AS400.

    I have tried [Ctrl][H] with the appropriate column selected, with the "-" in the find field and nothing in the replace field. This works, except the leading zero gets dropped if the number has one. We need the leading zero for the numbers to match in the 400.

    I have changed the column to Text prior to the find and replace, but it still drops any leading zeros.

    How can I strip the hyphens without dropping a leading zero?

    Using Office 2007 Plus 12.0.4518.1014 over Windows 7.
    Thanks!
    Dennis

    I am using Windows 7 and Office 2007, all of my posts are based on this.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Remove hyphens

    can you post a sample file?

  3. #3
    Forum Contributor
    Join Date
    03-24-2005
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    378

    Re: Remove hyphens

    Deleted all data except the field that needs the hyphen stripped.

    The field labeled "Tin NUM" has leading zeros in one record and multiple hyphens in another record. These are representative of about 20,000 records.

    Thanks.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    05-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    354

    Re: Remove hyphens

    =SUBSTITUTE(A2,"-","")

    Put his in row #2 of a new column and copy it down. Format the column as "General"
    Regards,
    Vandan

  5. #5
    Registered User
    Join Date
    05-14-2012
    Location
    boston, ma
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Remove hyphens

    you could also use the below to keep the leading 0s.
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    03-24-2005
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    378

    Re: Remove hyphens

    Both of thesse solutions worked!!

    Many Thanks!

+ 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