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.
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
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?
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.
Thank you.![]()
Please Login or Register to view this content.
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.
Here's one approach:
![]()
Please Login or Register to view this content.
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.
Can you use the zip code format for the number... ???
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,
Select the whole column, goto Format cells > Custom > Type : 000000 > OK
Kris
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...
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks