Forum Discussion
Excel: Count cells with specific value + colour
Hi there,
I would like to be able to count the number of cells that contain a specific value and are shaded a specific colour. This is for a rota spreadsheet that will be tallying the total number of shifts which have been agreed. The cells that contain "Yes" as a value from a drop down list and are shaded green, should be counted as part of the quarterly total.
I'm assuming that a VBA custom function would be needed for this. I've tried a few but cannot figure out a way to get this to work with both a specific value and colour. I would be very grateful for anyone that is able crack this challenge.
In the example screenshots, it is the cells shaded in green that would need to be counted and the totals appear in column GJ.
Best regards,
Daniel
3 Replies
- Harun24HRBronze Contributor
How the cells are made color? It is via conditional formatting or manually? If the color is made by conditional formatting then we could use same formula to count/some values.
- burningshieldCopper Contributor
The cells are manually highlighted to green. The idea is that individuals can mark the dates on the rota that they would prefer with a "Yes" from the drop down list in each cell. Then management can review and manually highlight in green which ones they have authorised. The authorised cells should then be counted as part of the quarterly total.
- burningshieldCopper Contributor
The cells are currently made colour manually. The idea is that individuals can select their preferred dates on the rota spreadsheet using a drop down list entry of "Yes". Management would then manually highlight the cell green if they approve it.