Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UK Postcode as a continous string 1

Status
Not open for further replies.

earthandfire

Programmer
Mar 14, 2005
2,924
GB
CorrectPostCode = Left(WrongPostCode, Len(WrongPostCode) - 3) & " " & Right(WrongPostCode, 3).

Regardless of how many characters in the postcode, it consists of two parts an Outcode and an Incode, the second part is the Incode which is always three characters Number, Letter, Letter.

Hope this helps

 
Hello all,

Need help to change UK postcodes which are set out as follow:

WA28WA

CH451NT

That is 6 or 7 in a string I need them to look like this:

WA2 8WA
CH45 1NT

That is with a space after the 3rd figure if 6 figures in string , or after 4th figure if 7 figures in string

Please advise
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top