Count Cell Colors

Mcook13

New Member
Joined
May 14, 2019
Messages
43
I have a column of dates and depending on the date, my conditional format will fill the cell with a specific color.

I am trying to count the number of cells with a specific color.

I've tried the GET.CELL function (although I may be doing it wrong) to try and return the background color value and the use the COUNT function get me my info. However from what I am understanding is GET.CELL won't return a color value if the color is produced automatically and seeing that I need my conditional formats in place to automatically highlight my cells I won't get that color number to count.

Due to how our sheets are setup I can't filter the values based on color which is why I am going the GET.CELL route. Basically I can't move or adjust the table. We're trying to have this done automatically.

Is there a way to work around this or is there a step I am missing to get this color count?

Thank you in advance
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
I have a column of dates and depending on the date, my conditional format will fill the cell with a specific color.

I am trying to count the number of cells with a specific color.
I believe to count cells with coloring applied via Conditional Formatting would require VBA code.
But why not just use the same rule you are using for Conditional Formatting to get your counts?
 
Upvote 0
I am not that knowledgeable on VBA to get the count.

Can you elaborate on using conditional format to get the count?
 
Upvote 0
What are you Conditional Formatting rules?
 
Upvote 0
If a date is within 6 months of expiring then the cell is highlighted yellow (from the standard fill colors) to alert.

I am using this formula to achieve this:

=AND(E5-TODAY()>=0,E5-TODAY()<=183)
 
Upvote 0
So, just apply the same logic in a COUNTIFS function to count how many records meet that same criteria.
If your data was in the range E5:E100, the formula would look like this:
Code:
=COUNTIFS(E5:E100,">=" & TODAY(),E5:E100,"<=" & (TODAY()+183))

For help on COUNTIFS, see here: https://exceljet.net/excel-functions/excel-countifs-function
 
Upvote 0

Forum statistics

Threads
1,223,268
Messages
6,171,100
Members
452,379
Latest member
IainTru

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top