+ Reply to Thread
Results 1 to 7 of 7

Leading Zeros for Base 10 to Base 36 Converter

  1. #1
    Registered User
    Join Date
    07-06-2011
    Location
    Utah
    MS-Off Ver
    Excel 2003
    Posts
    2

    Leading Zeros for Base 10 to Base 36 Converter

    Hi all,

    Tried to respond to your posts, but it keeps saying that my message is too short even though it is longer than the 10 characters required. Sorry.

    I got this vb conversion program from Tony who posted on Excel Forum. The program converts base 10 to base 36. The program works great. I just need it to add leading zeros in front of the base 36 number it generates. Does any one know how to do this? See the program below, thanks
    :


    Please Login or Register  to view this content.
    Last edited by norman.johnson; 07-07-2011 at 10:11 AM. Reason: Didn't follow forum rules

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: norman.johnson

    So much wrong with your post. Expect to get lit up by mods

  3. #3
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: norman.johnson

    Hi norman.johnson and welcome to the forum. Please take a moment to read the forum rules located here and amend your title as per Rule #1. Also, you must wrap your code in code tags as per Rule #3. Once you do that, someone will be able to help you.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Leading Zeros for Base 10 to Base 36 Converter

    I am not all that versed in the difference between Base 10 and Base 36. Just did a wikipedia search. I am not sure if the Base 36 by definition should have zeroes in front of it that is getting cut off or if you just want to add a zero in front of it. If the latter it might be a formatting issue or you could try the untested change below.

    Change
    Please Login or Register  to view this content.
    To:
    Please Login or Register  to view this content.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Leading Zeros for Base 10 to Base 36 Converter

    Here's similar UDF with the ability to specify the length:
    Please Login or Register  to view this content.
    E.g., =DblToBase(1E15, 36, 12) returns 009UGXNORJLS
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    07-06-2011
    Location
    Utah
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Leading Zeros for Base 10 to Base 36 Converter

    Quote Originally Posted by stnkynts View Post
    I am not all that versed in the difference between Base 10 and Base 36. Just did a wikipedia search. I am not sure if the Base 36 by definition should have zeroes in front of it that is getting cut off or if you just want to add a zero in front of it. If the latter it might be a formatting issue or you could try the untested change below.

    Change
    Please Login or Register  to view this content.
    To:
    Please Login or Register  to view this content.
    Thanks Stnkyts, that worked.

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Leading Zeros for Base 10 to Base 36 Converter

    If you are satisfied with the solution(s) provided, please mark your thread as Solved. Do not report the post, you can also give the person Rep points

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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