Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Excel

Oct 25, 2004 12:25AM PDT

I am trying to copy a nine digit number to excel and then adding dashes to turn that number to look like a Social Security Number. From 123456789 to 123-45-6789. Can anyone help?

Discussion is locked

- Collapse -
Re: Excel
Oct 25, 2004 3:32AM PDT

Are you using Excel 2002? (this may be available in earlier versions)

If so, please note that under Special Number Format there is the choice of Social Security Number. That is choose FORMAT- CELLS- NUMBER (tab)- SPECIAL- SOCIAL SECURITY NUMBER.

If not, then you can customize the cell number format by choosing CUSTOM and under TYPE enter: 000-00-0000. That is choose FORMAT- CELLS- NUMBER (tab)- CUSTOM- {enter under "TYPE:"} 000-00-0000.

Hope this helps.

- Collapse -
Re: Excel
Oct 25, 2004 5:54AM PDT

This works when I enter the number, but not when I copy if from a query that I have run.

- Collapse -
Re: Excel
Oct 25, 2004 7:50AM PDT

What query? Copy from where? How?

If I type a number in Notepad and transfer it to Excel using ctrl-c, ctrl-v it's being formatted with the format specified for the cell. Does this work with you the same way?
If I copy a number from an Excel cell to another Excel cell, it changes the format in the target cell to that of the source cell. Use Edit>Paste Special>Values to keep the format.

If all else fails, try to put something like =A7 in the target cell, with the right format, and copy the selection from the query to A7. This should work, in my opinion, whatever the source of the copy.

Hope this helps.


Kees