Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default FormatCellsSpecialZip Code

Every day I receive a list of Zip Codes covering Sales Leads. The as-received
format includes regular 5 digit zips, 5+4 zips, and 5 digit zips with the
leading zeros omitted, but I need to change it to 5 digit to process further.

Routinely, I use the command "FormatCellsSpecialZip Code" to add the
leading zeros back. But the command seems unable to convert a '5+4' format to
a simple 5 digit format, and I end up having to delete the hypen and the last
4 digits manually. Am I missing a trick?

Mike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default FormatCellsSpecialZip Code

Your 5+4 ZIPs were presumably stored as text, rather than as numbers, so
formatting the cell has no effect.
--
David Biddulph

"MichaelRobert" wrote in message
...
Every day I receive a list of Zip Codes covering Sales Leads. The
as-received
format includes regular 5 digit zips, 5+4 zips, and 5 digit zips with the
leading zeros omitted, but I need to change it to 5 digit to process
further.

Routinely, I use the command "FormatCellsSpecialZip Code" to add the
leading zeros back. But the command seems unable to convert a '5+4' format
to
a simple 5 digit format, and I end up having to delete the hypen and the
last
4 digits manually. Am I missing a trick?

Mike



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default FormatCellsSpecialZip Code

David:

Thanks for the suggestion but I don't think that 'stored as text' is the
problem. The FormatCellsSpecialZip Code command has no trouble adding
dropped leading zeroes. And it will not convert 5+4 ZIPs to 5 ZIPS after I
have formatted to 'number'.

Is there anyhting else?
M

"David Biddulph" wrote:

Your 5+4 ZIPs were presumably stored as text, rather than as numbers, so
formatting the cell has no effect.
--
David Biddulph

"MichaelRobert" wrote in message
...
Every day I receive a list of Zip Codes covering Sales Leads. The
as-received
format includes regular 5 digit zips, 5+4 zips, and 5 digit zips with the
leading zeros omitted, but I need to change it to 5 digit to process
further.

Routinely, I use the command "FormatCellsSpecialZip Code" to add the
leading zeros back. But the command seems unable to convert a '5+4' format
to
a simple 5 digit format, and I end up having to delete the hypen and the
last
4 digits manually. Am I missing a trick?

Mike




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default FormatCellsSpecialZip Code

What do =ISTEXT(A2) and =ISNUMBER(A2) say for your 5+4 ZIPs? I would still
suspect that you've got text rather than numbers.

If you do have text, then =LEFT(A2,5) ought to work to convert them to 5
ZIPs.
If they are numbers, then =LEFT(TEXT(A2,"000000000"),5) should do it (and on
a quick test it looks as if that would probably work with the text ones
too).
--
David Biddulph

"MichaelRobert" wrote in message
...
David:

Thanks for the suggestion but I don't think that 'stored as text' is the
problem. The FormatCellsSpecialZip Code command has no trouble adding
dropped leading zeroes. And it will not convert 5+4 ZIPs to 5 ZIPS after I
have formatted to 'number'.

Is there anyhting else?
M

"David Biddulph" wrote:

Your 5+4 ZIPs were presumably stored as text, rather than as numbers, so
formatting the cell has no effect.
--
David Biddulph

"MichaelRobert" wrote in
message
...
Every day I receive a list of Zip Codes covering Sales Leads. The
as-received
format includes regular 5 digit zips, 5+4 zips, and 5 digit zips with
the
leading zeros omitted, but I need to change it to 5 digit to process
further.

Routinely, I use the command "FormatCellsSpecialZip Code" to add the
leading zeros back. But the command seems unable to convert a '5+4'
format
to
a simple 5 digit format, and I end up having to delete the hypen and
the
last
4 digits manually. Am I missing a trick?

Mike






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default FormatCellsSpecialZip Code

Thanks, David.

ISTEXT returns FALSE; ISNUMBER returns TRUE.

The LEFT command works well - thank you.

Btw, even if I start with a fresh worksheet, and enter numbers to create a
5-4 ZIP (like 32034-1234) the FormatCellsSpecialZip Code command does not
convert the entry to 5 digits. Should it?

Mike

"David Biddulph" wrote:

What do =ISTEXT(A2) and =ISNUMBER(A2) say for your 5+4 ZIPs? I would still
suspect that you've got text rather than numbers.

If you do have text, then =LEFT(A2,5) ought to work to convert them to 5
ZIPs.
If they are numbers, then =LEFT(TEXT(A2,"000000000"),5) should do it (and on
a quick test it looks as if that would probably work with the text ones
too).
--
David Biddulph

"MichaelRobert" wrote in message
...
David:

Thanks for the suggestion but I don't think that 'stored as text' is the
problem. The FormatCellsSpecialZip Code command has no trouble adding
dropped leading zeroes. And it will not convert 5+4 ZIPs to 5 ZIPS after I
have formatted to 'number'.

Is there anyhting else?
M

"David Biddulph" wrote:

Your 5+4 ZIPs were presumably stored as text, rather than as numbers, so
formatting the cell has no effect.
--
David Biddulph

"MichaelRobert" wrote in
message
...
Every day I receive a list of Zip Codes covering Sales Leads. The
as-received
format includes regular 5 digit zips, 5+4 zips, and 5 digit zips with
the
leading zeros omitted, but I need to change it to 5 digit to process
further.

Routinely, I use the command "FormatCellsSpecialZip Code" to add the
leading zeros back. But the command seems unable to convert a '5+4'
format
to
a simple 5 digit format, and I end up having to delete the hypen and
the
last
4 digits manually. Am I missing a trick?

Mike








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 66
Default FormatCellsSpecialZip Code

ISTEXT is going return TRUE to the 5-4 zip code. If you enter
00000-1111, Excel assumes its a text entry, otherwise there'd be
confusion on whether it was a zip or a subtraction formula. Strings like
12345 are assumed to be numbers, unless you tell it otherwise, and you
can format numbers to have leading and trailing zeroes, but you can't
format text like that.

My wish is that people would treat zip codes, telephone numbers, serial
numbers (e.g part numbers) as they would text, because nobody is going
to do any calculations to those, except as a text character string.

Maybe clearer, maybe not. Hope it is.

Beege



MichaelRobert wrote:
Thanks, David.

ISTEXT returns FALSE; ISNUMBER returns TRUE.

The LEFT command works well - thank you.

Btw, even if I start with a fresh worksheet, and enter numbers to create a
5-4 ZIP (like 32034-1234) the FormatCellsSpecialZip Code command does not
convert the entry to 5 digits. Should it?

Mike

"David Biddulph" wrote:

What do =ISTEXT(A2) and =ISNUMBER(A2) say for your 5+4 ZIPs? I would still
suspect that you've got text rather than numbers.

If you do have text, then =LEFT(A2,5) ought to work to convert them to 5
ZIPs.
If they are numbers, then =LEFT(TEXT(A2,"000000000"),5) should do it (and on
a quick test it looks as if that would probably work with the text ones
too).
--
David Biddulph

"MichaelRobert" wrote in message
...
David:

Thanks for the suggestion but I don't think that 'stored as text' is the
problem. The FormatCellsSpecialZip Code command has no trouble adding
dropped leading zeroes. And it will not convert 5+4 ZIPs to 5 ZIPS after I
have formatted to 'number'.

Is there anyhting else?
M

"David Biddulph" wrote:

Your 5+4 ZIPs were presumably stored as text, rather than as numbers, so
formatting the cell has no effect.
--
David Biddulph

"MichaelRobert" wrote in
message
...
Every day I receive a list of Zip Codes covering Sales Leads. The
as-received
format includes regular 5 digit zips, 5+4 zips, and 5 digit zips with
the
leading zeros omitted, but I need to change it to 5 digit to process
further.

Routinely, I use the command "FormatCellsSpecialZip Code" to add the
leading zeros back. But the command seems unable to convert a '5+4'
format
to
a simple 5 digit format, and I end up having to delete the hypen and
the
last
4 digits manually. Am I missing a trick?

Mike




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default FormatCellsSpecialZip Code

David and Beege:

What I am taking from this discussion is that the FormatCellsSpecialZip
Code (5 digits) command will somehow change the format of 5 digits from ?? to
a 5 digit Zip Code (ie no change at all except to add any missing digits as
leading zeroes) . While the 5+4 command will change a 9 digit string into a
5-4 string.

Is that right? If so, it hardly seems worth having a special command.

Mike

"Beege" wrote:

ISTEXT is going return TRUE to the 5-4 zip code. If you enter
00000-1111, Excel assumes its a text entry, otherwise there'd be
confusion on whether it was a zip or a subtraction formula. Strings like
12345 are assumed to be numbers, unless you tell it otherwise, and you
can format numbers to have leading and trailing zeroes, but you can't
format text like that.

My wish is that people would treat zip codes, telephone numbers, serial
numbers (e.g part numbers) as they would text, because nobody is going
to do any calculations to those, except as a text character string.

Maybe clearer, maybe not. Hope it is.

Beege



MichaelRobert wrote:
Thanks, David.

ISTEXT returns FALSE; ISNUMBER returns TRUE.

The LEFT command works well - thank you.

Btw, even if I start with a fresh worksheet, and enter numbers to create a
5-4 ZIP (like 32034-1234) the FormatCellsSpecialZip Code command does not
convert the entry to 5 digits. Should it?

Mike

"David Biddulph" wrote:

What do =ISTEXT(A2) and =ISNUMBER(A2) say for your 5+4 ZIPs? I would still
suspect that you've got text rather than numbers.

If you do have text, then =LEFT(A2,5) ought to work to convert them to 5
ZIPs.
If they are numbers, then =LEFT(TEXT(A2,"000000000"),5) should do it (and on
a quick test it looks as if that would probably work with the text ones
too).
--
David Biddulph

"MichaelRobert" wrote in message
...
David:

Thanks for the suggestion but I don't think that 'stored as text' is the
problem. The FormatCellsSpecialZip Code command has no trouble adding
dropped leading zeroes. And it will not convert 5+4 ZIPs to 5 ZIPS after I
have formatted to 'number'.

Is there anyhting else?
M

"David Biddulph" wrote:

Your 5+4 ZIPs were presumably stored as text, rather than as numbers, so
formatting the cell has no effect.
--
David Biddulph

"MichaelRobert" wrote in
message
...
Every day I receive a list of Zip Codes covering Sales Leads. The
as-received
format includes regular 5 digit zips, 5+4 zips, and 5 digit zips with
the
leading zeros omitted, but I need to change it to 5 digit to process
further.

Routinely, I use the command "FormatCellsSpecialZip Code" to add the
leading zeros back. But the command seems unable to convert a '5+4'
format
to
a simple 5 digit format, and I end up having to delete the hypen and
the
last
4 digits manually. Am I missing a trick?

Mike





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
How to detect symbol/special character code Jeff Ingman Excel Discussion (Misc queries) 19 September 26th 07 08:41 PM
Format Cells by code Michael M Excel Worksheet Functions 3 April 4th 07 12:23 AM
Format cells for special characters Mad Davy Cash New Users to Excel 1 March 8th 07 09:51 PM
Format cells for special characters John Bundy New Users to Excel 0 March 8th 07 07:05 PM
Special Code Rao Ratan Singh New Users to Excel 3 June 2nd 06 08:05 PM


All times are GMT +1. The time now is 09:43 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"