I am working on a UK postcode map. It only has the first bit of the postcode, e.g. BR12. I have an excel spreadsheet with the longitude/latitude of specific points as well as their postcodes. Instead of plotting points I'd like to colour the postcode in which they are located.

Manually selecting the postcodes to colour would be a huge waste of time. Has anyone got a suggestion on how to proceed?

As per @Jospeh's suggestion, I have decided to go for the Rule-Based option on my .shp -however I don't understand how to add a rule as proposed below.

enter image description here

  • 1
    You could use a Rule-based style on your postcode map with a rule like "postcode_field" = 'BR12' to colour specific polygons.
    – Joseph
    May 24, 2016 at 10:44
  • Thanks @Joseph - could I ask you where I can add such rule?
    – pdx
    May 24, 2016 at 11:19
  • I see you already did it =). I suggest you post your edit as an answer as it sounds like it solved your problem.
    – Joseph
    May 24, 2016 at 11:28
  • 2
    Why not using just the Categorized style?gis.stackexchange.com/a/20408/5193
    – LauriK
    May 24, 2016 at 11:34
  • @LauriK - That probably is a better method if the values are exact which seems to be in this question :). I'm biased as I prefer rule-based styles, which could be useful when you have full postcodes but want to give the same colour to each postcode area (e.g. "postcode_field" LIKE 'BR12%' would colour all polygons with postcodes starting with BR12.
    – Joseph
    May 24, 2016 at 11:42

1 Answer 1


After having browsed a bit on GIS, I found this thread v helpful.

I have added an indicator on my spreadsheet (where I have the lon/lat and postcodes). Then I added the spreadsheet as a vector layer. After that I double clicked on my shapefile > Joins > merged the data together. I used this new merged data to colour selectively on "Categorized" as explained in the linked thread.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.