If you take the postcodes and use Data Text to Columns and use Fixed instead of a delimiter and place the separator close to the second element of the postcode, you will end up with a 4 character code. The last character on a lot of the codes will be a space.
Use the LEFT function to extract the first 4 characters from the postcodes given in the addresses as the lookup key for VLOOKUP.
Enter this in G3 and fill down:
Formula:
=VLOOKUP(LEFT(F3,4),$M$3:$N$10,2,0)
This is looking up the first 4 characters of the postcode in the table that is in M3:N10 as below:
|
M |
N |
3 |
SY1 |
A |
4 |
SY2 |
A |
5 |
SY7 |
B |
6 |
SY9 |
B |
7 |
TF1 |
B |
8 |
TF4 |
B |
9 |
TF9 |
C |
10 |
WV16 |
C |
Here is your workbook back with the formula and the small table so that you can experiment with it.
Bookmarks