Days since last accident

uwfenske

New Member
Joined
Feb 15, 2010
Messages
14
I need some help on calculating days since last accident when our driver is at fault. Here is what I am working with.

Date At Fault Department
1/1/10 Driver Bus
1/2/10 Other Van 2
1/2/10 Driver Van 1
1/4/10 Driver Car
1/4/10 Driver Van 2
1/5/10 Other Bus

I want to be able to show how many days since the accident by "Department" when the "At Fault" column is "Driver".

I thought is would have to be a CSA formula and using some sort of DATEDIF function, but cannot figure it out. Any thoughts?
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Welcome to the board...

Try this, provided the data is sorted ascending on the dates..

Column A is dates
Column B is Fault
Column C is Department

=TODAY()-LOOKUP(2,1/((B1:B1000="Driver")*(C1:C1000="Department")),A1:A1000)
 
Last edited:
Upvote 0
Welcome to the Board,

An alternative to jonmo1's suggestion:

Excel Workbook
ABCDEF
1DateAt FaultDepartmentDepartmentDays Since Most Recent Driver Accident
201/01/2010DriverBusBus45
302/01/2010OtherVan 2Van 144
402/01/2010DriverVan 1Van 242
504/01/2010DriverCarCar42
604/01/2010DriverVan 2
705/01/2010OtherBus
Sheet1
Excel 2003
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}. Note: Do not try and enter these manually yourself
The dates on the Worksheet are UK formatted, but the underlying numbers are the same.

Does this help?

Matty
 
Upvote 0
I have a very similar problem, abeit I have a table with the sites in the columns and the incidents in the rows one of the rows is "Lost Time Accident" they are totalled at the end of that row, I have a formula that will reset the count to zero if an entry is made in the Lost Time accident row but I cannot figure out how to continue the count from the following date without deleting the Lost time incident. The safe days number "204" is worked out by subtracting today from the 1st of January but will zero if an entry is made in B2 if that makes sense, I just need to know either a code or formula that will restart the count again even with the entry in B2 unless another entry is added
ABC
Lost Time Accident00
All Incidents25
Highest Incident TypeAllergies
Site With Highest Incident rateAshgate Manor
Safe Days204204
 
Upvote 0
I have a very similar problem, abeit I have a table with the sites in the columns and the incidents in the rows one of the rows is "Lost Time Accident" they are totalled at the end of that row, I have a formula that will reset the count to zero if an entry is made in the Lost Time accident row but I cannot figure out how to continue the count from the following date without deleting the Lost time incident. The safe days number "204" is worked out by subtracting today from the 1st of January but will zero if an entry is made in B2 if that makes sense, I just need to know either a code or formula that will restart the count again even with the entry in B2 unless another entry is added
ABC
Lost Time Accident00
All Incidents25
Highest Incident TypeAllergies
Site With Highest Incident rateAshgate Manor
Safe Days204204
I see that you already posted a version of this question here: Reset cell to count from zero the next day
As per forum rules, please do not post the same question multiple times (rule 12 here: Message Board Rules).
Posts of a duplicate nature will typically be locked or deleted.

Please continue on in your original thread.
 
Upvote 0

Forum statistics

Threads
1,225,317
Messages
6,184,251
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