I have a column in a table (called TabPostcodes) with full postcodes and iv'e added a second column where I want to populate with the relevant county based on a separate tables on a different worksheet based on partial postcodes.
e.g. I have several postcodes that are in the same county - CH1 2RJ, CH1 2LK, CH2 5TY, CH48 6YU. These are all in Cheshire.
In my separate table I have the partial postcodes in column A and the corresponding county in column B.
e.g.
CH1 Cheshire
CH2 Cheshire
CH3 Cheshire
...
CH48 Cheshire
etc
For each full postcode I need to return the county based on either the first 3 characters OR the first 4. I've tried the following which I think should return based on the first 4 charcters, but I'm getting an error... (i'm adding this as an array formula).
=INDEX(TabLookup[ColB],MATCH(LEFT([@Postcode],4),TabLookup[County]))
I think my problem is that I need to handle the possibility that the character lookup could be 3 or 4 characters.
Any ideas?
e.g. I have several postcodes that are in the same county - CH1 2RJ, CH1 2LK, CH2 5TY, CH48 6YU. These are all in Cheshire.
In my separate table I have the partial postcodes in column A and the corresponding county in column B.
e.g.
CH1 Cheshire
CH2 Cheshire
CH3 Cheshire
...
CH48 Cheshire
etc
For each full postcode I need to return the county based on either the first 3 characters OR the first 4. I've tried the following which I think should return based on the first 4 charcters, but I'm getting an error... (i'm adding this as an array formula).
=INDEX(TabLookup[ColB],MATCH(LEFT([@Postcode],4),TabLookup[County]))
I think my problem is that I need to handle the possibility that the character lookup could be 3 or 4 characters.
Any ideas?