How to have 4 digits in a cell regardless of the number
Solved
maxdu.88
-
Aranud87 Posted messages 277 Registration date Status Contributeur Last intervention -
Aranud87 Posted messages 277 Registration date Status Contributeur Last intervention -
Hello,
I am currently working on the land registry and I would like my value to automatically appear in 4 digits. For example, for parcel 14, I want it to appear as 0014.
Finally, I would like to copy this value while keeping this form to move it to another cell.
Thank you in advance
Configuration: Windows 7 / Firefox 27.0
I am currently working on the land registry and I would like my value to automatically appear in 4 digits. For example, for parcel 14, I want it to appear as 0014.
Finally, I would like to copy this value while keeping this form to move it to another cell.
Thank you in advance
Configuration: Windows 7 / Firefox 27.0
7 réponses
Hello,
2 possibilities:
- either you want to keep a number (for future calculations and you right-click on Cell Format then create a Custom format with 0000, Excel will add the necessary leading zeros to the entered value
- or you enter your value as text by typing directly into the cell '0014
Best regards
--
"Imagination is more important than knowledge." A. Einstein
2 possibilities:
- either you want to keep a number (for future calculations and you right-click on Cell Format then create a Custom format with 0000, Excel will add the necessary leading zeros to the entered value
- or you enter your value as text by typing directly into the cell '0014
Best regards
--
"Imagination is more important than knowledge." A. Einstein
Hello
maybe another idea:
=A1&TEXT(B1;"0000")
with the first number in A1 and the one to be converted into 4 digits in B1
best regards
To err is human, to persist is diabolical
maybe another idea:
=A1&TEXT(B1;"0000")
with the first number in A1 and the one to be converted into 4 digits in B1
best regards
To err is human, to persist is diabolical
Lu,
I’m not very familiar with Excel, but in Calc from LibreOffice, under cell format, you have "leading zeros"
There you put 4 and as you can see I typed 14, it shows me 0014
I think there must be something like that in Excel:
large format: https://pix.toile-libre.org/upload/original/1395176154.png
--
Simple and community-based
GNU/Linux Mageia :)
I’m not very familiar with Excel, but in Calc from LibreOffice, under cell format, you have "leading zeros"
There you put 4 and as you can see I typed 14, it shows me 0014
I think there must be something like that in Excel:
large format: https://pix.toile-libre.org/upload/original/1395176154.png
--
Simple and community-based
GNU/Linux Mageia :)
I have already completed the first method. I created a column by grouping using the CONCATENATE function (I combine the INSEE code + cadastral sector + parcel number); however, the parcel numbers lose their leading zeros.
I would like to work in text format, but the person who gave me this database has the parcel number without the leading zeroes. How can I convert a raw number (167) to a usable text format (0167)?
Finally, the via55 technique doesn’t work because I have a lot of zeroes.
Finally, the via55 technique doesn’t work because I have a lot of zeroes.
Hello,
Another suggestion that covers a bit of everything.
Column A, which contains the plot number, is set to the custom format "0000".
To concatenate, we use the TEXT function:
=codeInsee&Sector&TEXT(A1;"0000")
Another suggestion that covers a bit of everything.
Column A, which contains the plot number, is set to the custom format "0000".
To concatenate, we use the TEXT function:
=codeInsee&Sector&TEXT(A1;"0000")
Hello
A friend gave me a starting idea and I managed to solve my problem, but my manipulation is more complex.
I take the cadastral number, divide it by 10,000, then I use the function =CTXT(Q2;4;TRUE) to get 4 digits after the decimal point, and finally I finish with the function =MID(R2;3;4) to remove the 0 before the decimal point and the decimal point itself.
Thank you for your ideas
Best regards
A friend gave me a starting idea and I managed to solve my problem, but my manipulation is more complex.
I take the cadastral number, divide it by 10,000, then I use the function =CTXT(Q2;4;TRUE) to get 4 digits after the decimal point, and finally I finish with the function =MID(R2;3;4) to remove the 0 before the decimal point and the decimal point itself.
Thank you for your ideas
Best regards