Hi all,
I'm struggling to work out a formula, and wondering if you guys can help...
I'm wanting to match a postcode with the first part of a postcode so I can assign a code to it, probably using MATCH or VLOOKUP formulas, so ideally the data would look like this
Postcode Postcode prefix Region code
SW1Y6LR SW1Y 6 SW01
SW21QW SW2 1 SW02
SW22FB SW2 2 SW02
SW23JH SW2 3 SW02
SW24KM SW2 4 SW02
SW25SC SW2 5 SW02
SW31AZ SW3 1 SW03
SW32QN SW3 2 SW03
The data comes in two lots (postcodes and then the postcode prefix and region code data), so I'm wanting to find a formula that matches the postcode up with the postcode prefix, then allowing me to assign a region code to each postcode.
The challenge is the postcode prefix varies in length and is a mix letters and numbers
Does anyone know a solution to this please?
Thanks for your help,
PC
Bookmarks