Assuming no more than 2 digits to the right of the dash, try:
=LEFT(A1,FIND("-",A1))&TEXT(RIGHT(A1,2),"00;00")
Tim C
"hkslater" wrote:
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.
|