=SUBSTITUTE - UK Post Codes

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,004
Office Version
  1. 365
  2. 2016
Hi Folks

I have seen the answer to this but my powers of searching have failed me. How do I turn a UK postcode NW1 4DA for example into just NW, bearing in mind there may be an additional number/letter in the mix.

I'm sure it's =SUBSTITUTE but I don't really know how that function works.

Thanks in advance for any help


Dave :biggrin:
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,004
Office Version
  1. 365
  2. 2016
Thank you, appreciate it. I'll remember that one for future
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
If you want to extract just the letters, e.g. NW from NW1 4DA but only W from W1 1AA try this formula

=LEFT(A1,1+ISERR(MID(A1,2,1)+0))
 

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,004
Office Version
  1. 365
  2. 2016
Thank you Barry

I was just about to ask that very question.

KR


Dave
 

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,004
Office Version
  1. 365
  2. 2016
Find/Replace Wildcards

Hi All

Is it possible to use a wildcard in find/replace. In my post I basically wanted to get rid of all the specific area data just to bring me down to a larger area thus anonymising peoples names, I would also like all my post codes to be in double letter. The best way I reckon I could do this is by adding a Z to the end of any single letter areas as Z isn't used in the UK postal code system.

Thanks for everyone's help


Dave
 

Forum statistics

Threads
1,136,263
Messages
5,674,710
Members
419,521
Latest member
Jasonnie

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
Top