=SUBSTITUTE - UK Post Codes

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,079
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
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

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,079
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
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,079
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
Thank you Barry

I was just about to ask that very question.

KR


Dave
 

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,079
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
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,171,253
Messages
5,874,677
Members
433,065
Latest member
Leo55

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