ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   format social security number as XXX-XX-1234 (https://www.excelbanter.com/excel-programming/282793-format-social-security-number-xxx-xx-1234-a.html)

svetlana

format social security number as XXX-XX-1234
 
Does someone know how to format a social security number
as XXX-XX-1234? I know how to do this using concatenate
function, but would like to find out if it is possible
using the formatting programming. I tried:
_("XXX-XX-"0_) and _("XXX-XX-"#_), but that i still get
the whole number after the X's.
Thanks!
Svetlana

RADO[_3_]

format social security number as XXX-XX-1234
 
Sveta,

I think you can use something like 000-00-0000

Best,
RADO


"Svetlana" wrote in message
...
Does someone know how to format a social security number
as XXX-XX-1234? I know how to do this using concatenate
function, but would like to find out if it is possible
using the formatting programming. I tried:
_("XXX-XX-"0_) and _("XXX-XX-"#_), but that i still get
the whole number after the X's.
Thanks!
Svetlana




Chris

format social security number as XXX-XX-1234
 
This will work:

(assuming there's an SSN in cell A1):

=TEXT(A1,"000-00-0000")

Hope this helps!

Arthur[_3_]

format social security number as XXX-XX-1234
 
Why can you not use a copy and past special when using this function. I have several hundred rows that need to be formatted, and it does not allow me to copy the formula to multiple cells.

RWN

format social security number as XXX-XX-1234
 
When you say "formula" are you talking about the format itself?
If you select the rows then "Format-Cells-Special" and click the
Social Security Number format it will apply that format to all the
selected cells.

--
Regards;
Rob
------------------------------------------------------------------------
"Arthur" wrote in message
...
Why can you not use a copy and past special when using this function.

I have several hundred rows that need to be formatted, and it does not
allow me to copy the formula to multiple cells.




All times are GMT +1. The time now is 08:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com