Two good suggestions... thanks!
--
"swatsp0p" wrote in
message ...
Excel is simply displaying the zeros, which are not really there (try
=Len(A1) to see). Using that principle, we can test the length of A1
and add zeros as needed:
in cell A2:
=IF(LEN(A1)=4,"0"&A1&"XX",IF(LEN(A1)=3,"00"&A1&"XX ",A1&"XX"))
I am assuming no part code number is fewer than three 'true' digits
(00123)
|