ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Counting how many days since last accident occured on the job (https://www.excelbanter.com/excel-discussion-misc-queries/211200-counting-how-many-days-since-last-accident-occured-job.html)

aussiegirlone

Counting how many days since last accident occured on the job
 
Dear someone, I am trying to calculate the number of days since the last
accident that occured on the job using a formular. column (A) is the date, &
column (B) is the accidents. Does anyone know a formular that would calculate
when the last accident occured e.g. 157 days ago?

ExcelBanter AI

Answer: Counting how many days since last accident occured on the job
 
Hello! I can definitely help you with that. You can use the TODAY() function in Excel to calculate the number of days since the last accident occurred. Here are the steps:
  1. In a new cell, type in "=TODAY()" (without the quotes). This will give you today's date.
  2. In another cell, type in "=MAX(A:A)" (without the quotes). This will give you the latest date in column A.
  3. In a third cell, subtract the latest date from today's date using the formula "=TODAY()-MAX(A:A)" (without the quotes). This will give you the number of days since the last accident occurred.
  4. Format the cell with the result as a number with no decimal places.

That's it! Now you have the number of days since the last accident occurred. You can also use conditional formatting to highlight the cell if the number of days exceeds a certain threshold, such as 30 days or 90 days. Let me know if you have any questions or need further assistance.

Mike H

Counting how many days since last accident occured on the job
 
Hi,

With the date of your last accident in b1 try this

=DATEDIF(B1,TODAY(),"d")

Mike

"aussiegirlone" wrote:

Dear someone, I am trying to calculate the number of days since the last
accident that occured on the job using a formular. column (A) is the date, &
column (B) is the accidents. Does anyone know a formular that would calculate
when the last accident occured e.g. 157 days ago?


Dave Peterson

Counting how many days since last accident occured on the job
 
Just subtract the date of the last accident from today's date and format the
cell as general.

Maybe something like:

=today()-max(a:a)

And format as general.

aussiegirlone wrote:

Dear someone, I am trying to calculate the number of days since the last
accident that occured on the job using a formular. column (A) is the date, &
column (B) is the accidents. Does anyone know a formular that would calculate
when the last accident occured e.g. 157 days ago?


--

Dave Peterson

aussiegirlone

Counting how many days since last accident occured on the job
 
Thank you so very much for your help Mike
However, as I still need to be able to combine both the accident with the
date, (which I dont know how to do either,) Would the edited formular below
be ok?
=DATEDIF(H33*B33,TODAY(),"d")
"Mike H" wrote:

Hi,

With the date of your last accident in b1 try this

=DATEDIF(B1,TODAY(),"d")

Mike

"aussiegirlone" wrote:

Dear someone, I am trying to calculate the number of days since the last
accident that occured on the job using a formular. column (A) is the date, &
column (B) is the accidents. Does anyone know a formular that would calculate
when the last accident occured e.g. 157 days ago?


aussiegirlone

Counting how many days since last accident occured on the job
 
Thank you Dave for your help! It works really well

"Dave Peterson" wrote:

Just subtract the date of the last accident from today's date and format the
cell as general.

Maybe something like:

=today()-max(a:a)

And format as general.

aussiegirlone wrote:

Dear someone, I am trying to calculate the number of days since the last
accident that occured on the job using a formular. column (A) is the date, &
column (B) is the accidents. Does anyone know a formular that would calculate
when the last accident occured e.g. 157 days ago?


--

Dave Peterson


Mike H

Counting how many days since last accident occured on the job
 
Hi,

What is in those 2 cells

H33 = ?
B33 = ?

Mike

"aussiegirlone" wrote:

Thank you so very much for your help Mike
However, as I still need to be able to combine both the accident with the
date, (which I dont know how to do either,) Would the edited formular below
be ok?
=DATEDIF(H33*B33,TODAY(),"d")
"Mike H" wrote:

Hi,

With the date of your last accident in b1 try this

=DATEDIF(B1,TODAY(),"d")

Mike

"aussiegirlone" wrote:

Dear someone, I am trying to calculate the number of days since the last
accident that occured on the job using a formular. column (A) is the date, &
column (B) is the accidents. Does anyone know a formular that would calculate
when the last accident occured e.g. 157 days ago?


David Biddulph[_2_]

Counting how many days since last accident occured on the job
 
Why not =TODAY()-B1 ?
What extra value does DATEDIF give, if you are dealing in days?
--
David Biddulph

"Mike H" wrote in message
...
Hi,

With the date of your last accident in b1 try this

=DATEDIF(B1,TODAY(),"d")

Mike

"aussiegirlone" wrote:

Dear someone, I am trying to calculate the number of days since the last
accident that occured on the job using a formular. column (A) is the
date, &
column (B) is the accidents. Does anyone know a formular that would
calculate
when the last accident occured e.g. 157 days ago?




aussiegirlone

Counting how many days since last accident occured on the job
 
Dear Mike
B is the dates Column, H are the accidents column, therefore B33, = dates
and H33 = accidents. Your formular works very well as does the formular Dave
Peterson gave. Both work very well even by me modifying them.

=DATEDIF(H33*B33,TODAY(),"d")
=TODAY()-MAX(B:B,H:H)

"Mike H" wrote:

Hi,

What is in those 2 cells

H33 = ?
B33 = ?

Mike

"aussiegirlone" wrote:

Thank you so very much for your help Mike
However, as I still need to be able to combine both the accident with the
date, (which I dont know how to do either,) Would the edited formular below
be ok?
=DATEDIF(H33*B33,TODAY(),"d")
"Mike H" wrote:

Hi,

With the date of your last accident in b1 try this

=DATEDIF(B1,TODAY(),"d")

Mike

"aussiegirlone" wrote:

Dear someone, I am trying to calculate the number of days since the last
accident that occured on the job using a formular. column (A) is the date, &
column (B) is the accidents. Does anyone know a formular that would calculate
when the last accident occured e.g. 157 days ago?


Mike H

Counting how many days since last accident occured on the job
 
David,

No added value. I simply like Datedif so tend to offer it as a solution
because I think it's quite intuative for posters to recognise exactly what's
going on.

Mike



"David Biddulph" wrote:

Why not =TODAY()-B1 ?
What extra value does DATEDIF give, if you are dealing in days?
--
David Biddulph

"Mike H" wrote in message
...
Hi,

With the date of your last accident in b1 try this

=DATEDIF(B1,TODAY(),"d")

Mike

"aussiegirlone" wrote:

Dear someone, I am trying to calculate the number of days since the last
accident that occured on the job using a formular. column (A) is the
date, &
column (B) is the accidents. Does anyone know a formular that would
calculate
when the last accident occured e.g. 157 days ago?





aussiegirlone

Counting how many days since last accident occured on the job
 
Hello David
It is good to know that there is so much help available, and each one of you
that has responded, have given me a very good formular to work with, as each
one works well. Thank you kindly for your help!

"David Biddulph" wrote:

Why not =TODAY()-B1 ?
What extra value does DATEDIF give, if you are dealing in days?
--
David Biddulph

"Mike H" wrote in message
...
Hi,

With the date of your last accident in b1 try this

=DATEDIF(B1,TODAY(),"d")

Mike

"aussiegirlone" wrote:

Dear someone, I am trying to calculate the number of days since the last
accident that occured on the job using a formular. column (A) is the
date, &
column (B) is the accidents. Does anyone know a formular that would
calculate
when the last accident occured e.g. 157 days ago?





Chip Pearson

Counting how many days since last accident occured on the job
 

because I think it's quite intuative for posters to recognise exactly what's
going on.


True enough, but it might be worth mentioning that DATEDIF isn't
documented in the Excel help files to prevent users from wasting time
trying to track it down.

Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

On Fri, 21 Nov 2008 05:12:01 -0800, Mike H
wrote:

David,

No added value. I simply like Datedif so tend to offer it as a solution
because I think it's quite intuative for posters to recognise exactly what's
going on.

Mike



"David Biddulph" wrote:

Why not =TODAY()-B1 ?
What extra value does DATEDIF give, if you are dealing in days?
--
David Biddulph

"Mike H" wrote in message
...
Hi,

With the date of your last accident in b1 try this

=DATEDIF(B1,TODAY(),"d")

Mike

"aussiegirlone" wrote:

Dear someone, I am trying to calculate the number of days since the last
accident that occured on the job using a formular. column (A) is the
date, &
column (B) is the accidents. Does anyone know a formular that would
calculate
when the last accident occured e.g. 157 days ago?






All times are GMT +1. The time now is 01:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com