Forcing a postcode in Excel 2003

S

Scott

Doing a simple spreadsheet with UK postcodes in trying to make it so that
whatever you put in is in a predesigned way. At the moment I have it so
that format cells asks for AA## #AA, but this does not seem to work? I want
to force capital letters and to force a 0 if the postcode first number is a
single figure (example if the postcode is ip6 8ly, I want excel to convert
it to IP06 8LY)...

Get my point???

Regards Scott
 
J

Jamie Collins

Scott said:
At the moment I have it so
that format cells asks for AA## #AA

A UK postcode is a bit more complex. For details (and I
think I've got the correct country this time, Tom <g>) see:

http://www.evoxfacilities.co.uk/evoxps.htm

FWIW I found this (untested) SQL DDL in my notes, which
includes a simple regex for a UK postcode:

postcode VARCHAR(8) NOT NULL
CHECK (postcode LIKE '[A-Z][$A-Z][0-9][$0-9A-Z] [0-9][ABD-
HJLNP-UW-Z][ABD-HJLNP-UW-Z]')

Jamie.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top