View Single Post
  #4   Report Post  
hkslater
 
Posts: n/a
Default

This actually got me 03-01 instead of 31-01.

"Frank Kabel" wrote:

Hi
or another alternative (a little bit shorter):
=TEXT(--SUBSTITUTE(A1,"-",""),"00-00")

--
Regards
Frank Kabel
Frankfurt, Germany

"hkslater" schrieb im Newsbeitrag
...
I have a data field that I want to instert a leading zero (where

necessary)
so that I may sort the data correctly. Is there an easy way to do

this?

My service codes currently sort as follows:

32-1
32-10
32-11
32-12
32-2
32-20
32-21
32-3

Is there formula that will insert a leading zero into the 32-1, 32-2,

32-3
etc. to make it 32-01, 32-02, 32-03?

Thanks for the help.