View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default special formatting (for social security numbers)

You can't do it with formatting.

--
Regards,
Tom Ogilvy

"svetlana" wrote in message
...
Working with a social security number (let's say: 1234-56-
7890), I need to preserve the whole number in the cell,
but display only the last 4 digits (which would look like:
XXXX-XX-7890).

I know how to do this using concatenate function, but need
to know if it is possible to do using the formatting
programming. I tried:_("XXX-XX-"0_) and _("XXX-XX-"#_),
but i still get the whole number (all 10 digits instead of
the last 4) after the X's.

Thanks a lot!
Svetlana