Convert Excel formula to Access help..?

towners

Board Regular
Joined
Mar 12, 2009
Messages
225
Office Version
  1. 365
Platform
  1. Windows
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:

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
 
Hmmm,

Now I have the postcode area in my query... How do I join it to my lookup table?

Any help much appreciated...

Paul
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top