Days Without Incidents

dcherney

New Member
Joined
Feb 10, 2021
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hey all, first time posting in here. I'll try to explain what I'm trying to do the best I can.

I'm looking to count the green cells (no incident) from the previous red cell (incident). I would like it to count automatically every time I either add the green color to a cell (date). Or start back at 0 if i add the red color into the cell (date). See below

1612980499800.png



Any help is greatly appriecated.

Thank you!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Welcome to the Board!

One of the issues is that Excel formulas cannot run off of the formatting that is in cells. It can only run off of the values in those cells. So to do something off of the formatting would require VBA.

Another big factor is how these calendars are actually set up in Excel. Are you using Calendar Controls, or are the calendars simply just grids/tables you set up in Excel?
If the later, than another issue is that each entry in each cell is just a number, and not a valid date (making it much harder to do calculations off of it).

Really, the easiest way to make that an easy calculation is to actually enter the date of the last Incident in some static cell.
So, if it was cell Z1, then the number of days since the last incident would just be:
Excel Formula:
=TODAY()-Z1

Or it would also be simpler if you just had a log somewhere, where each day you are making an entry and indicating if there were any incidents or not.

Otherwise, I am not sure how you could do this without using some VBA.
 
Upvote 0

Forum statistics

Threads
1,225,319
Messages
6,184,258
Members
453,223
Latest member
Ignition04

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