ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Adding "0" as leading digits into cells in Excel (https://www.excelbanter.com/excel-worksheet-functions/114885-adding-0-leading-digits-into-cells-excel.html)

Tippetue

Adding "0" as leading digits into cells in Excel
 
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.

SteveW

Adding "0" as leading digits into cells in Excel
 
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


On Wed, 18 Oct 2006 05:09:01 +0100, Tippetue
wrote:

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.


Gord Dibben

Adding "0" as leading digits into cells in Excel
 
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)ValueOKEsc.

Delete original row.


Gord Dibben MS Excel MVP


Gord Dibben MS Excel MVP

On Tue, 17 Oct 2006 21:09:01 -0700, Tippetue
wrote:

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.




All times are GMT +1. The time now is 09:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com