Automatically calculate number of overdue cells in a column?

youngxvato

New Member
Joined
Jan 25, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am trying to figure out how to automatically calculate the number of red cells in a column into rows 74/75. I have been having to input them manually and would like it to calculate on its own. Screenshot attached for better understanding as I am not entirely sure how to explain it.

Any help would be greatly appreciated!
 

Attachments

  • excel.png
    excel.png
    48.9 KB · Views: 16

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
You can't count cells by their formatting.
What is the conditional formatting rule for the column?

if the formatting rule is something like:
DueDate < CurrentDate

Assuming the two columns below are same length (or one is just cell length of 1):
then your counting rule would be:
=SUM(--(DueDateRange < CurrentDate))
 
Upvote 0
Here is a link that shows a short VBA code to count cell colors.

Here is a link that shows different ways to count without VBA

However awoohaw suggestion of using your conditional formatting formula or dates you use to determine the current overdue, etc. is probably the best way to have it automated.
 
Upvote 0
You can't count cells by their formatting.
What is the conditional formatting rule for the column?

if the formatting rule is something like:
DueDate < CurrentDate

Assuming the two columns below are same length (or one is just cell length of 1):
then your counting rule would be:
=SUM(--(DueDateRange < CurrentDate))
Thanks for the reply! Attached is the conditional formatting for the column in question. However it's formatted now, i get an automated count for the cells that fall under the ="" rule. Ultimately, what i want to happen is to also get a count of the cells that fall under the < NOW()-365 rule.

Please forgive me, I know next to nothing about excel. :(
 

Attachments

  • conditional formatting.png
    conditional formatting.png
    21.7 KB · Views: 3
Upvote 0
You will need to change the ranges to match your data (range that holds your dates), but try this.

Book1
AB
1Date
24/6/2023
36/1/2023
47/1/2022
5
610/22/2023
7
8Count
92
Sheet2
Cell Formulas
RangeFormula
B9B9=ROWS(FILTER($A$2:$A$6,($A$2:$A$6<NOW()-365)+($A$2:$A$6="")))
 
Upvote 0
UPDATE:

After doing further research I have found the solution to my problem.
The answer I was looking for was to insert the following function in cell c74:
=COUNTIF(c3:c68,"<="&TODAY()-365)

I appreciate all of your responses.
 
Upvote 0
Solution
Glad you found an answer. I misunderstood and thought you also wanted to count the blank cells.
 
Upvote 0

Forum statistics

Threads
1,215,077
Messages
6,122,991
Members
449,094
Latest member
masterms

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