Hello
This should be easy but I can't seem to find how to do it.
What I want to do is create a worksheet template so that when a list of addresses are pasted into it, all the Scottish postcodes will be highlighted.
The postcode is already seperated from the address into its own column (K) to make things easier.
Next, I have a list of all the first parts of all Scottish postcodes e.g. G1 Glasgow AB14 Aberdeen, DD4 Dundee. I suppose this can be situated anywhere as a look-up reference Nb there are 430 different Scottish postcode areas in the list.
Therefore I need some kind of code to so that when I paste in a mixture of all UK postcodes (up to 1000 at any one time) it will highlight the Scottish ones based on the first part of the postcode from looking up my list.
I would prefer if the actual postcode cell box is highlighted, not the one adjacent as per below. This was just for illustration purposes.
For anyone unfarmiliar with UK postcodes, the XX could be any 2 alphabetical letters depending on the area.
But it's the first part before the space which is crucial and will dertimine if its Scottish or not.
This first part will always be in the format of one or two letters, followed by one or two numbers.
To illustrate:
[TABLE="width: 219"]
<tbody>[TR]
[TD]TN17 7XX
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]
ME3 9XX
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]
CF31 3XX
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]
WN5 8XX
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]
G77 2XX
[/TD]
[TD]Highlight
[/TD]
[/TR]
[TR]
[TD]
KA6 4XX
[/TD]
[TD]Highlight
[/TD]
[/TR]
[TR]
[TD]
EH3 9XX
[/TD]
[TD]Highlight
[/TD]
[/TR]
[TR]
[TD]
BA20 6XX
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]
GL3 5XX
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]
AB11 6XX
[/TD]
[TD]Highlight
[/TD]
[/TR]
[TR]
[TD]
M14 7XX
[/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]
This should be easy but I can't seem to find how to do it.
What I want to do is create a worksheet template so that when a list of addresses are pasted into it, all the Scottish postcodes will be highlighted.
The postcode is already seperated from the address into its own column (K) to make things easier.
Next, I have a list of all the first parts of all Scottish postcodes e.g. G1 Glasgow AB14 Aberdeen, DD4 Dundee. I suppose this can be situated anywhere as a look-up reference Nb there are 430 different Scottish postcode areas in the list.
Therefore I need some kind of code to so that when I paste in a mixture of all UK postcodes (up to 1000 at any one time) it will highlight the Scottish ones based on the first part of the postcode from looking up my list.
I would prefer if the actual postcode cell box is highlighted, not the one adjacent as per below. This was just for illustration purposes.
For anyone unfarmiliar with UK postcodes, the XX could be any 2 alphabetical letters depending on the area.
But it's the first part before the space which is crucial and will dertimine if its Scottish or not.
This first part will always be in the format of one or two letters, followed by one or two numbers.
To illustrate:
[TABLE="width: 219"]
<tbody>[TR]
[TD]TN17 7XX
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]
ME3 9XX
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]
CF31 3XX
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]
WN5 8XX
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]
G77 2XX
[/TD]
[TD]Highlight
[/TD]
[/TR]
[TR]
[TD]
KA6 4XX
[/TD]
[TD]Highlight
[/TD]
[/TR]
[TR]
[TD]
EH3 9XX
[/TD]
[TD]Highlight
[/TD]
[/TR]
[TR]
[TD]
BA20 6XX
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]
GL3 5XX
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]
AB11 6XX
[/TD]
[TD]Highlight
[/TD]
[/TR]
[TR]
[TD]
M14 7XX
[/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]