+ Reply to Thread
Results 1 to 10 of 10

How to set initial value 000000?

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    How to set initial value 000000?

    Hello friends,
    I want to set the initial value '000000' in the cell b4 in the attached workbook. Now it's set to 0 but I'm unable to set it to '000000'.

    Any help will be appreciated.

    Thanking you in anticipation.
    Last edited by mso3; 12-11-2014 at 11:12 PM.
    Sincerely,

    mso3

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: How to set initial value 000000?

    It depends on what you want the true result to be.

    If the value is to be numeric, Excel will not store leading or trailing (after the decimal) zeros.
    To display them, you'd need to change your custom number format to:
    "अ. No."#000000

    However, if you want the value to be 000000, you'd need to format the cell as text and actually prepend the prefix.
    so the actual cell value would be: अ. No.#000000

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: How to set initial value 000000?

    Hi Ron,
    Thank you. I want the initial value '000000' in cell b4. How to set it in the code below.

    Please insert the same text number format in the following code.

    Please Login or Register  to view this content.
    Thank you.

    Hi Ron,
    Thank you for your response.
    I want the val initially '000000' then how to set it in the macro set first time value in the attached workbook?

    Please insert the suggested format in the code for me.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: How to set initial value 000000?

    Here's one approach:
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: How to set initial value 000000?

    Hi Ron,
    Sorry! It's not giving me the require output. It's changing the initial value to 000000 but after hitting enter key on b4 the output is No. 1 which should be No. 000001, No. 000002 and so on after hitting enter key on b4. Please see the attached workbook and the code to generate the lc number increase code.

    Thank you.

  6. #6
    Forum Contributor
    Join Date
    04-14-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    198

    Re: How to set initial value 000000?

    Can you use the zip code format for the number... ???

  7. #7
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: How to set initial value 000000?

    Hi Cory,
    Thank you. I'm working on this workbook only. I have nothing to do with the format which it is. I want the output as per my requirement only.

    Please suggest me a code to achieve my target positively.

    Thank you,

  8. #8
    Forum Contributor
    Join Date
    02-19-2005
    Location
    Gurgaon,India
    MS-Off Ver
    2007,2010,2013
    Posts
    180

    Re: How to set initial value 000000?

    Select the whole column, goto Format cells > Custom > Type : 000000 > OK
    Kris

  9. #9
    Forum Contributor
    Join Date
    04-14-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    198

    Re: How to set initial value 000000?

    I dont understand looking at your code it jumps from function to function and not sure where exactly you are having to set this or if it is changing in each function... that being said the only thing I can say is wherever you are setting it try to set it as an integer to only accept 6 numbers or whatever you are trying to get...

  10. #10
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: How to set initial value 000000?

    Hi Ron, Krushnakumar and Cory,
    Thank you for your guidance. I changed the format of cell and the problem is solved.

    Thank you for your guidance.
    Last edited by mso3; 12-12-2014 at 12:56 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] change numbers from 1.000.000 to 1.000000
    By Jorgelina in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-09-2014, 04:25 PM
  2. Replies: 3
    Last Post: 03-09-2012, 03:19 PM
  3. First initial last name
    By sparky101747 in forum Excel General
    Replies: 9
    Last Post: 02-06-2011, 06:45 PM
  4. Last initial
    By Mike Rogers in forum Excel General
    Replies: 14
    Last Post: 01-28-2006, 12:19 PM
  5. Remove middle initial from "first name middle initial"
    By Justin F. in forum Excel General
    Replies: 15
    Last Post: 09-26-2005, 02:05 PM

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