Post codes

G

Guest

I have a report that examines postcodes. For those of you not in the UK, this is an 8 character field. For example

GU21 1JN At the moment, I am using the left characters only. This is fine for

G
R
A

et

but I want to be able to lump city postcodes, for example

L
L
L

together, but retain the dual (town) postcodes.

I cannot think of a simple way to do this, can anyone help

:(
 
S

SA

Nik:

You can use the Mid() function to pull the second value in the post code and
then use the IsNumeric() function to see if you've got a city or not. What
I'd do then is to create an alaised field where in you use those to tests in
an IIF statement to get your key field to group by.

Eg: PostGroup: IIF(IsNumeric(Mid([PostCode],2,1)),
Left([PostCode],1),Left([PostCode],2))

HTH
 
G

Garry

While on the subject of PostCodes
When I receive postcodes such as CF205PN or CF25PN how can it be split too
CF20 5PN and CF2 5PN
any thoughts Garry

Nik Hammond said:
I have a report that examines postcodes. For those of you not in the UK,
this is an 8 character field. For example:
 

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