Hi all,
Early days with Access and attempting to transfer some Excel 2010 work over to Access 2010.
I wonder if anyone could help convert a really useful formula I use in Excel that takes a UK Postcode and strips out all but the initial character(s) (I use the result in a lookup to associate the Postcode with a larger geographical area. Postcodes can begin with either 1 or 2 characters i.e. "G1" for Glasgow or "LE1" for Leicester I need the code to consider this.
The code I currently use is:
Any help to convert this into a formula I can use in a query would be much appreciated.
Many thanks
Paul
Early days with Access and attempting to transfer some Excel 2010 work over to Access 2010.
I wonder if anyone could help convert a really useful formula I use in Excel that takes a UK Postcode and strips out all but the initial character(s) (I use the result in a lookup to associate the Postcode with a larger geographical area. Postcodes can begin with either 1 or 2 characters i.e. "G1" for Glasgow or "LE1" for Leicester I need the code to consider this.
The code I currently use is:
Code:
=IF(ISERROR(VALUE(MID($AK2,2,1))={1,2,3,4,5,6,7,8,9,0}),TRIM(LEFT($AK2,2)),TRIM(LEFT($AK2,1)))
Any help to convert this into a formula I can use in a query would be much appreciated.
Many thanks
Paul