Adding "0" as leading digits into cells in Excel

T

Tippetue

How can I add "0's" as additional first digits for numbers in a row
containing 4000 random numbers, i.e. change 1346 to become 01346 and 2345 to
become 02345... and so forth.

If I try "Format cells" and select "Text" I can type the "0" manually cell
by cell and it will be displayed with the "0" as the first digit. However if
I try to use "Edit" and "Replace" in order to automize the insertion of
thousands of "0", it still leaves the "0" out and only displays the number
as it was before. I would be greatful for any ideas.
 
S

SteveW

You can format the cell as Custom 00000
This won't add 1 specific zero, but will work for all 4 digiti numbers
So 10 will appear as 00010 and 10,000 as 10000

Steve
 
G

Gord Dibben

If you don't care if they become text...........

In a helper row enter ="0" & cellref

Drag/copy across.

When happy, select the helper row and copy it.

Paste Special(in place)>Value>OK>Esc.

Delete original row.


Gord Dibben MS Excel MVP


Gord Dibben MS Excel MVP
 

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