Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not showing leading zero

Status
Not open for further replies.

crossmank

Technical User
Nov 27, 2002
13
US
How do you format a excel 2002 cell with alpha-numeric so that a leading zero is not displayed? Example: the number "0305676P" I want to be displayed "305676P", but the number "1305676P" I want to be displayed as is???


Any help would be appreciated, thanks
 
Right click on the cell column
Go to Format Cells
Select Custom
In type put in 00000000

This will display leading zero's. Although when you re-open it, it will remove the leading zero's. This is a feature in Excel that I hate. I think it can be fixed by writing a macro.

Dodge20
 
If your data actually has the "P" suffix in the cell, then you will not be able to get rid of the leading zero very easily. However, if your data is just the numbers, then you can get the display you want by using a custom format of "0P" (Format Cells / Custom and enter 0P for the format.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top