+ Reply to Thread
Results 1 to 14 of 14

Reformat SSN to add dashes between numbers

  1. #1
    Registered User
    Join Date
    06-09-2011
    Location
    Seattle Washington
    MS-Off Ver
    Excel 2003
    Posts
    40

    Reformat SSN to add dashes between numbers

    I have a list of 375 social security numbers. I want to reformat the numbers to add a dash in between the numbers so I can run a query on them. Right now they are showing as 123456789. I want them to show as 123-45-6789. Does anyone know of a fast and easy way to make this happen instead of me clicking in each cell and adding a dash between the numbers?
    Thanks.
    Last edited by wheatgrass; 06-13-2011 at 10:30 PM.

  2. #2
    Registered User
    Join Date
    05-11-2011
    Location
    College Station, Texas
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    42

    Re: Reformat SSN to add dashes between numbers

    Hi,

    Format it as Social Security Number:

    Format->Special->Social Security Number

    Regards,
    Abi
    Abi

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: Reformat SSN to add dashes between numbers

    I'm guessing that reformatting will only change the display of the SSN. Do you need actual hyphens inserting?

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    06-09-2011
    Location
    Seattle Washington
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Reformat SSN to add dashes between numbers

    Yes, I need actual hyphens inserting between numbers.

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Reformat SSN to add dashes between numbers

    Hi wheatgrass

    Insert a new column (assume Column B) with your original numbers in Column A. Enter this formula in Column B and drag down
    Please Login or Register  to view this content.
    Copy/Paste Special --> Values from Column B to Column A. Delete Column B.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: Reformat SSN to add dashes between numbers

    One way:

    Please Login or Register  to view this content.


    Adjust the startrow and the column as required; it's currently set up to operate on column 1 (A) and start at row 1.

    Regards

  7. #7
    Registered User
    Join Date
    05-11-2011
    Location
    College Station, Texas
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    42

    Re: Reformat SSN to add dashes between numbers

    Hello,

    try executing this code

    Please Login or Register  to view this content.
    Regards,
    Abi

  8. #8
    Registered User
    Join Date
    06-09-2011
    Location
    Seattle Washington
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Reformat SSN to add dashes between numbers

    Thanks, worked like a charm.

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: Reformat SSN to add dashes between numbers

    Thanks, worked like a charm.
    Not sure which solution you are referring to.

    However, if your question has been answered, please mark your thread as solved. See my signature for details or the FAQ.

    Regards

  10. #10
    Registered User
    Join Date
    01-17-2013
    Location
    Delaware, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Reformat SSN to add dashes between numbers

    Hi,

    So this does work for 2007 I have done it will it also work for 2010 using the same steps?

    wk

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: Reformat SSN to add dashes between numbers

    You're post might well be considered hijacking ... but give it a go, what have you got to lose?

    Regards, TMS

  12. #12
    Registered User
    Join Date
    01-17-2013
    Location
    Delaware, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Reformat SSN to add dashes between numbers

    Hi TMS,

    Not sure what the "considered hijacking" means but I'm soory if I have stepped on any toes.

    Back on 6-12-11 there was a posting:

    Hi,

    Format it as Social Security Number:

    Format->Special->Social Security Number

    Regards,............

    I mentioned these directions do work with Excel version 2007, because I have done it. I was wondering if these same steps will work with 2003 & 2010?

    Thanks, wk

  13. #13
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: Reformat SSN to add dashes between numbers

    Hi WK ... no toes hurt, or even bruised.

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.


    ... is what I meant, just to quote the rule. Reviving an 18 month old post isn't usually such a good idea, either


    That said, there's no code there that will cause concern in 2003 or 2010.

    But, I repeat the question: "why not give it a go, what have you got to lose?"

    The worst that can happen is that you would get an error message.


    Regards, TMS

  14. #14
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: Reformat SSN to add dashes between numbers

    @wkelley: Thanks for the rep.

+ 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