Excel - Inserting "-" dashes into number

Asked By Lisa W on 15-Oct-09 12:01 PM
I have a number that is always this format:  1993200000002000-02
and I need it to be this format:  199-32-0-00-00-002-00-0-02

Is there an easy formula to make this so?

Thanks, Lisa




Rick Rothstein replied on 15-Oct-09 12:20 PM
Here is one way to do it...

=TEXT(LEFT(A1,10),"000-00-0-00-00-")&TEXT(SUBSTITUTE(RIGHT(A1,9),"-",""),"000-00-0-00")

--
Rick (MVP - Excel)