ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add 0 to the beginning of the cell (https://www.excelbanter.com/excel-programming/331943-add-0-beginning-cell.html)

bklim[_4_]

Add 0 to the beginning of the cell
 

Dear Excel experts

12345 - 0000012345
12 - 0000000012
432567 - 0000432567
9 - 0000000009
4444444444 4444444444

The 1st column shows the original figures. I wish to add "0" to the
beginning of the cell to make the total number of digit becomes 10,
what would be the formula? Please advise.

Thank you in advance.

Regards/Mike


--
bklim
------------------------------------------------------------------------
bklim's Profile: http://www.excelforum.com/member.php...o&userid=24268
View this thread: http://www.excelforum.com/showthread...hreadid=379590


mangesh_yadav[_327_]

Add 0 to the beginning of the cell
 

Select cell.
Format Cells Number tab Select custom In type enter 0000000000

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=379590


bklim[_5_]

Add 0 to the beginning of the cell
 

Thanks Mangesh :

--
bkli
-----------------------------------------------------------------------
bklim's Profile: http://www.excelforum.com/member.php...fo&userid=2426
View this thread: http://www.excelforum.com/showthread.php?threadid=37959


Arvi Laanemets

Add 0 to the beginning of the cell
 
To convert numbers to text strings with leading 0's, use the formula like
=TEXT($A2,"0000000000")

--
Arvi Laanemets
( My real mail address: arvil<attarkon.ee )



"bklim" wrote in
message ...

Dear Excel experts

12345 - 0000012345
12 - 0000000012
432567 - 0000432567
9 - 0000000009
4444444444 4444444444

The 1st column shows the original figures. I wish to add "0" to the
beginning of the cell to make the total number of digit becomes 10,
what would be the formula? Please advise.

Thank you in advance.

Regards/Mike


--
bklim
------------------------------------------------------------------------
bklim's Profile:
http://www.excelforum.com/member.php...o&userid=24268
View this thread: http://www.excelforum.com/showthread...hreadid=379590




Toppers

Add 0 to the beginning of the cell
 
Hi,
Set cell(s) format as shown below:

NumberFormat = "0000000000"

e.g.

Columns("A:A").Select
Selection.NumberFormat = "0000000000"

Or go to Format--Cells---Custom--Type and enter"0000000000" (without
quotes)


HTH

"bklim" wrote:


Dear Excel experts

12345 - 0000012345
12 - 0000000012
432567 - 0000432567
9 - 0000000009
4444444444 4444444444

The 1st column shows the original figures. I wish to add "0" to the
beginning of the cell to make the total number of digit becomes 10,
what would be the formula? Please advise.

Thank you in advance.

Regards/Mike


--
bklim
------------------------------------------------------------------------
bklim's Profile: http://www.excelforum.com/member.php...o&userid=24268
View this thread: http://www.excelforum.com/showthread...hreadid=379590



K Dales[_2_]

Add 0 to the beginning of the cell
 
If you only need to display it (format it) that way, then in the cell format
choose Custom and make the custom format 0000000000.

If you actually need to convert the value;
=Right("0000000000"&A1,10) - worksheet formula
=Right("0000000000"&MyVar) - VBA, where MyVar is the variable with the
original figure in it.


"bklim" wrote:


Dear Excel experts

12345 - 0000012345
12 - 0000000012
432567 - 0000432567
9 - 0000000009
4444444444 4444444444

The 1st column shows the original figures. I wish to add "0" to the
beginning of the cell to make the total number of digit becomes 10,
what would be the formula? Please advise.

Thank you in advance.

Regards/Mike


--
bklim
------------------------------------------------------------------------
bklim's Profile: http://www.excelforum.com/member.php...o&userid=24268
View this thread: http://www.excelforum.com/showthread...hreadid=379590




All times are GMT +1. The time now is 02:55 AM.

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