I have a workbook with a column of numbers varying from 3 digits to 6 digits. I need to add leading zeros so all numbers contain 6 digits. Is this possible? I've attached a simple example. Any suggestions would be appreciated.
Sick
I have a workbook with a column of numbers varying from 3 digits to 6 digits. I need to add leading zeros so all numbers contain 6 digits. Is this possible? I've attached a simple example. Any suggestions would be appreciated.
Sick
Last edited by sick stigma; 04-20-2021 at 05:17 PM.
The main question I see is whether these need to be numbers or text -- how will these numbers be used?
If they need to be numbers, but displayed with leading zeroes, simply format with a number format code like "000000". Remember that the actual cell value is the number (A1 will still be 654), but you will see the leading zeroes in the cell display.
If they need to be text (so the actual cell value is "000654", then you will need to enter the numbers as text (preformat the cell as text or precede the data entry with an apostrophe) or you will need to convert them to text after data entry (something like =TEXT(A1,"000000")).
You will need to know enough about how you intend to use these numbers or how you intend to interact with them in order to decide which approach you want to use.
Originally Posted by shg
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks