Extracting UK post codes

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Upvote 0
Rick

Thank you so much for your help , I do have a problem in getting the formula to operate, see copy below.

UKPostCode
Post Codes
Church Farm House, 6 Church Farm Lane, Sidlesham, Chichester, PO20 7RE - F/C Tank Model Major, Flat Top Blowdown Vessel, Sample#NAME?
.
Installed @ Glenmuir Limited, Weavers Walk Lanark, Scotland ML11 9AW
Project: C&N Chambers - Address not known
Wheatfield Prison, Dublin
End User Not Known
.
Not known
End User Not Known
End User Not Known
.
End User: Not known
.
Supplied 2003 -Installed @ Sketchleys, 41 Market Place, Reading, Berks RG1 2DE Branch Ref: 6524
Supplied 2003 - Installed @ Sketchleys, 849 Osmaston, Allenton, Derby, DE24 9ABAllenton, Derby. Branch Ref: 6171
Birchley House, Birchley Roundabout, Birchfield Lane, Oldbury, West Midlands B69 1DT
Trading Estate, PO Box 2246, Dubai, United Arab Emirates
<colgroup><col width="957" style="width: 718pt; mso-width-source: userset; mso-width-alt: 34998;"> <col width="64" style="width: 48pt;"> <col width="232" style="width: 174pt; mso-width-source: userset; mso-width-alt: 8484;"> <tbody> </tbody>

As you can see I am getting a message #NAME?

Any help would be appreciated.

Derek
 
Upvote 0
Derek,

I suspect that you have copied Rick's functions to a sheet module rather than a code module.

If you are using Rick's final offering with the validation then you will need to copy both bits of code to the module.

Open the vb editor - F11 and click Insert - Module and paste the code into the code pane on the rhs.

The function UKPostCode will then be in the function drop down when you enter =U in a cell within your sheet.

Hope that helps.
 
Upvote 0
A #NAME? error is generated when Excel does not recognize something in the formula as a valid function name... my guess is you spelled my function name (UKPostCode) in the formula (perhaps you put an "s" on the end of it?). Another possibility is you installed the code in the wrong place (it should be in a general module) and Excel cannot find it.
 
Upvote 0
Rick / Tony

I have recopied the code and ensured that it is not copied to the Worksheet , named the module UKPostCode,and then saved it as a macro enabled xlsm and exited to worksheet.

All of the text strings are column " A " starting "A2". I then insert in "C2" =UKPostCode , and I get the error NAME? .

Help where am I going wrong.

Really do appreciate you Guys help

Derek
 
Upvote 0

Forum statistics

Threads
1,215,529
Messages
6,125,345
Members
449,220
Latest member
Edwin_SVRZ

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