+ Reply to Thread
Results 1 to 3 of 3

Removal of Hyphens from Number or Text formatted cells

  1. #1
    Registered User
    Join Date
    12-21-2006
    Posts
    4

    Removal of Hyphens from Number or Text formatted cells

    Does anyone have a means to remove hyphens from a text or number formatted cell(eg AVE 68-391 or AAG 777-7777). Thanks.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    With a helper column.

    Assume data in Col A enter this in B1

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

    and drag down. Copy and then paste special values.

    Or Select the column and press Ctrl + H. In the Find box enter - and in the replace box leave blank. Select replace all

    HTH

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    If it is text, use:

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

    If it is a special format (e.g. SSN), then just change the formatting to General (or other format as needed).

+ 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