Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How can I get a leading zero (ZIP code) to show in a LEFT() calc?

I have a numeric field that is formatted to display as a ZIP code and a field
to its right that is supposed to show the first three digits of the ZIP code
for 3-digit sorting.

However, Excel strips the leading 0 off ZIP code numbers beginning with it
before storing it, resulting in incorrect data in the field on the right,
which displays the LEFT(...,3) function result. What's more, the actual ZIP
codes print without the leading zeroes.

How can I get the leading zeroes to print and be included in the 3-digit
field?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 284
Default How can I get a leading zero (ZIP code) to show in a LEFT() calc?

MarketStEl

Formate the cells as Text, Place and "Apostrophe" (single quote ' )n the
cell before entering the zip code or...Gotoformat CellSpecialZip Code.

HTH

Mike ogers

"MarketStEl" wrote:

I have a numeric field that is formatted to display as a ZIP code and a field
to its right that is supposed to show the first three digits of the ZIP code
for 3-digit sorting.

However, Excel strips the leading 0 off ZIP code numbers beginning with it
before storing it, resulting in incorrect data in the field on the right,
which displays the LEFT(...,3) function result. What's more, the actual ZIP
codes print without the leading zeroes.

How can I get the leading zeroes to print and be included in the 3-digit
field?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default How can I get a leading zero (ZIP code) to show in a LEFT() calc?

If your first column is formatted as a zip code (Format/Cells/Special/Zip
Code), I'm not sure why it won't print properly.

You could modify your Left Formula:
=LEFT(TEXT(A1,"00000"),3)
to get the leading 0's in your second column.


"MarketStEl" wrote:

I have a numeric field that is formatted to display as a ZIP code and a field
to its right that is supposed to show the first three digits of the ZIP code
for 3-digit sorting.

However, Excel strips the leading 0 off ZIP code numbers beginning with it
before storing it, resulting in incorrect data in the field on the right,
which displays the LEFT(...,3) function result. What's more, the actual ZIP
codes print without the leading zeroes.

How can I get the leading zeroes to print and be included in the 3-digit
field?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to calc Marcelo Excel Discussion (Misc queries) 5 September 13th 06 08:27 PM
I'm looking for a formula to calc # of days left in a month Manthony Excel Worksheet Functions 3 June 6th 06 03:15 PM
Leading zero in zip code won't print J Mac Excel Discussion (Misc queries) 7 September 1st 05 12:07 AM
How do I retain leading zero zip code formatting when saving as a. RodFCIS Excel Discussion (Misc queries) 7 January 25th 05 07:29 PM
how do you display a zip code with a leading zero nicole Excel Discussion (Misc queries) 2 January 25th 05 12:18 AM


All times are GMT +1. The time now is 01:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"