Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default If Statements

Is it possible to automate the checking of a Postcode column to determine
whether or not the entry is valid : ie not blank, does not contain hypens
and is greater than 4 characters.
If tried using the built in help functions for Excel 2000 but just end up
with gibberish.

Thanks in anticipation


Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default If Statements

Mike,

Which country's postcodes are you talking about?

UK postcodes are complicated as the first 4 characters (the outward code)
can be
1st char 2nd char 3rd char 4th char
letter letter number number eg.
TW21
letter number number nothing eg.
L22
letter number nothing nothing eg.
E9
letter letter number letter
eg. EC1V

There is always a space followed by 1 number (0-9) and two letters for the
second (inward) part of the code.

e.g.
E9 2ZZ
TW21 5SS
L22 4QQ
EC1V 1LE

The way I check that the postcode is valid in my program is to first check
that the user has entered the last four characters as
space,number,letter,letter.
If this is OK, I then use a lookup list to check that the outward code is in
our area.
If this is what you want then repost here and I'll forward the code.

If you want to do this for the whole of the UK, I suggest that you contact
the Post Office postcode helpline for an up-to-date list. There are
thousands of outward codes and the list changes frequently. This is due to
PostTown boundary changes and temporary codes such as BS99 (a code used for
mass mailings, catalogues, etc.) being added and removed.

HTH
Henry





"Mike Wilson" wrote in message
. uk...
Is it possible to automate the checking of a Postcode column to determine
whether or not the entry is valid : ie not blank, does not contain hypens
and is greater than 4 characters.
If tried using the built in help functions for Excel 2000 but just end up
with gibberish.

Thanks in anticipation


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
If Statements Abby Dabby Doo[_2_] Excel Discussion (Misc queries) 3 November 12th 08 09:22 PM
Help with IF statements JStiehl New Users to Excel 4 August 17th 08 11:54 PM
IF statements profmorse Excel Discussion (Misc queries) 5 December 20th 06 07:41 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
if statements qwerty_2006 Excel Worksheet Functions 3 March 12th 06 08:09 AM


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