+ Reply to Thread
Results 1 to 6 of 6

Add 0 to the beginning of the cell

  1. #1
    Registered User
    Join Date
    06-13-2005
    Posts
    10

    Adding 0 to the beginning of the cell, to make the total no of digits becomes 10

    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
    Last edited by bklim; 06-16-2005 at 02:59 AM.

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    Select cell.
    Format > Cells > Number tab > Select custom > In type enter 0000000000

    Mangesh

  3. #3
    Registered User
    Join Date
    06-13-2005
    Posts
    10

    Thank you very much!

    Thanks Mangesh

  4. #4
    Arvi Laanemets
    Guest

    Re: 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<at>tarkon.ee )



    "bklim" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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. #5
    Toppers
    Guest

    RE: 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. #6
    K Dales
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1