Fill with zero

R

RLB

Hi,
I table of 3 digit numeric fields, data in field can be 1-3 significant
digits. I use the numbers as input to another look up that requires all 3
digits and filled with zeros. So I need a formula to determine number of
significant digits in original field and if less than 3 fill to 3 with zeros.
I tried "format" as well as "precision as displayed", but niether worked.
 
R

Ragdyer

Are you talking about -
012
OR
120
AND
Are you talking about *true* XL numbers or text?

For text you might try:

=REPT(0,3-LEN(A1))&A1
OR
=TEXT(A1,"000")
for 012

=A1&REPT(0,3-LEN(A1))
for 120
 
R

RLB

Hi Don,
For some reason format doesn't work on this problem. When I go to format
cell it is a "special with chinese" and when I change to custom 000 it won't
take.
Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top