adding zero's to a text cell

G

Guest

Hi,

I have a cell with 5 digits stored as text. I need to add 3 zeros to the
cell so my total digits in the cell = 7. How can I add the zeros to the
beginning of the cell?
ie. current digits = 4204, desired outcome = 0004204. The cell must remain
in text format.

Thanks,
 
C

CLR

Assuming your numbers are in column A,
in B1 put this and copy down.........

="000"&A1

then Copy > PasteSpecial > Values on column B to delete the formulas and
delete column A if desired


Vaya con Dios,
Chuck, CABGx3
 
T

TommySzalapski

If you are trying to do this in a worksheet function use =text(A1,
"0000000")
This will format the number to always have seven digits to the left of
the decimal point.

If you want to just type it in the cell and have it keep the zeros type
a ' in front of the number like '0045343. The apostrophe just tells
excel to treat those zeros as text and will not print or even show in
the cell.

Szalapski
 

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