COUNTIF function but with conditional formatted cells

Occasional Contributor



I have a spreadsheet that uses conditional formatting via a drop down list that the cell changes colour depending on result. I want to be able to count the number of cells that are certain colours. I have watch tutorials for Get.cell but that can't work with condition formatting. I've also looked at setting up VBA but can't seem to get that to work either wasn't sure if this is because of the formatting.

Please help is there a solution to this?

Thanks, Jenny

3 Replies


Instead of counting the cells by colour, count them based on the values of the cells.

@Hans Vogelaar 

There isn't actually any values in the cell just a colour - or would it count the list value? Ive hidden the text by making it same colour as cell so only a colour shows.

Hi i have found a function COUNTIFS that seems to work. Thanks