Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I delete a space in the beginning of a cell... | Excel Discussion (Misc queries) | |||
Search end/beginning of cell | Excel Discussion (Misc queries) | |||
End/Beginning of Cell Search/Replace? | Excel Worksheet Functions | |||
Weird characters at beginning of cell | Excel Discussion (Misc queries) | |||
Remove ' at beginning of cell | Excel Programming |