Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I delete a space in the beginning of a cell... GSimone Excel Discussion (Misc queries) 2 April 3rd 23 04:41 PM
Search end/beginning of cell msnyc07 Excel Discussion (Misc queries) 2 April 29th 10 01:05 AM
End/Beginning of Cell Search/Replace? msnyc07 Excel Worksheet Functions 1 February 8th 10 02:37 PM
Weird characters at beginning of cell jdelcour Excel Discussion (Misc queries) 3 July 18th 06 06:51 PM
Remove ' at beginning of cell JB[_2_] Excel Programming 1 April 6th 04 03:07 AM


All times are GMT +1. The time now is 10:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"