Assuming that their are only 2 characters left of "-"
=IF(LEN(MID(A1,3,1024))=2,SUBSTITUTE(A1,"-","-0"),A1)
"hkslater" wrote in message
...
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.
|