make cell length always equal 10
If the sample part number is in A1, then the corrected part number is:
=LEFT(A1,10) & REPT("0",MAX(10-LEN(A1),0))
--
Gary's Student
gsnu200703
"Little Pete" wrote:
hi,
i have a serial number used as part of a plant number, this section has to
be 10 digits in lenght. to build the plant number i am copying the serial
number in from another column. when the serial number is 10 everything is ok
but when it is to short i need the system to fill it up with 0 at the end or
when it is to long i need the system to take only the first 10.
thanks for the help!
|