#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nick
 
Posts: n/a
Default formatting

hi...can anyone help me with this zip-code formatting logic? I have a zip
code (could be in any format) in WK1 and using the logic below i need to
populate the zip code in WK2.

N---Numeric
C---Char

For US: The valid format is NNNNN-NNNN
- When US Zip Code length without '-' or ' ' is 5 and < 9 char then use
first 5 positions
- When Us Zip Code length is <5 chars then move space.
- When US Zip code is having alphabet, invalid and blank then move space
- When US zip code is having 9 char width then pass 5-4 format (99999-9999)
- When US Zip Code length without '-' or ' ' is 9 then use first 9 char.
- When Zip is empty or not valid, move '00000' to SAP

For CANADA: The valid format is CNC NCN
- When zip code length is 7 char, move first 7 char
- When zip code length is <7 char, move space
- When zip code is blank and invalid then move space.
- When Zip is empty or not valid, move 'A0A 0A0' to SAP

For London (county code GB):
- zip code must not exceed 9 characters (<=9 char). If 9 char then, move
first 9 char.)
- When Zip is empty or not valid, move '000000000' to SAP

For Other countries:
- Pass as it is.

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
Conditional Formatting Error ddate Excel Worksheet Functions 0 May 5th 05 09:00 PM
difficulty with conditional formatting Deb Excel Discussion (Misc queries) 0 March 23rd 05 06:13 PM
conditional formatting question Deb Excel Discussion (Misc queries) 0 March 23rd 05 02:07 AM
Formatting dates in the future Compass Rose Excel Worksheet Functions 3 January 17th 05 10:39 PM
Copy conditional formatting across multiple rows? Gil Excel Discussion (Misc queries) 1 January 11th 05 11:27 AM


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