Format Text
A variation of TM's suggestion:
=REPLACE(REPLACE(REPLACE(A1,10,,"-"),9,,"-"),7,,"-")
The numbers are in largest to smallest, and refer to the position in the
original string.
(It made the counting easier for me.)
Teethless mama wrote:
=REPLACE(REPLACE(REPLACE(A1,7,,"-"),10,,"-"),12,,"-")
"Hughes" wrote:
I'm trying to format order numbers in excel and I want dashes to fill in
automatically. The problem is I have numbers and text for each order. For
example: SRT46510D1234 is what I want to type in, but I want it to appear as
SRT456-10-D-1234. Is there a way to make that happen?
--
Dave Peterson
|