ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Allowing a leading zero if there is one (https://www.excelbanter.com/excel-discussion-misc-queries/148043-allowing-leading-zero-if-there-one.html)

RontheWrench

Allowing a leading zero if there is one
 
I have looked & looked through all the postings about this subject and none
of them quite cover what I'm after.

I am trying to input Part Numbers in a spreadsheet. Some of the part
numbers are short - some are long. Some lead with a zero ... some do not.

How can I format the cells to display a zero if a zero is keyed in as the
FIRST digit??
--
Thanks in advance for any help!

Tim Shnell

Allowing a leading zero if there is one
 
On Jun 26, 12:08 pm, RontheWrench
wrote:
I have looked & looked through all the postings about this subject and none
of them quite cover what I'm after.

I am trying to input Part Numbers in a spreadsheet. Some of the part
numbers are short - some are long. Some lead with a zero ... some do not.

How can I format the cells to display a zero if a zero is keyed in as the
FIRST digit??
--
Thanks in advance for any help!


Since they're part numbers, I assume you don't need to be able to
multiply with them and such. Therefore, I would recommend entering
them with a leading apostrophe. For example, '0550221 instead of
0550221. This will format your input as text and should preserve the
leading 0. The apostrophe will not be displayed.

Hope that helps,

Tim


Rick Rothstein \(MVP - VB\)

Allowing a leading zero if there is one
 
I have looked & looked through all the postings about this subject and
none
of them quite cover what I'm after.

I am trying to input Part Numbers in a spreadsheet. Some of the part
numbers are short - some are long. Some lead with a zero ... some do
not.

How can I format the cells to display a zero if a zero is keyed in as the
FIRST digit??
--
Thanks in advance for any help!


Since they're part numbers, I assume you don't need to be able to
multiply with them and such. Therefore, I would recommend entering
them with a leading apostrophe. For example, '0550221 instead of
0550221. This will format your input as text and should preserve the
leading 0. The apostrophe will not be displayed.


Or, you could format the column as Text, then you won't need the apostrophe
(whatever you type in a cell will be what is displayed).

Rick



All times are GMT +1. The time now is 10:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com