PC Review


Reply
Thread Tools Rate Thread

Counting days between dates

 
 
aussiegirlone
Guest
Posts: n/a
 
      2nd Dec 2008
What I am trying to do is calculate the days between accidents. My first
input date is 01-Jan- 2008 and my next input date is 23-Jan-2008. The days
inbetween should count "22" if true, or if false then "False"
PS: I do not want to count from the first inpute date to today, I only want
to count from incident to incident.
Can anyone help me please
 
Reply With Quote
 
 
 
 
T. Valko
Guest
Posts: n/a
 
      2nd Dec 2008
Just subtract:

A1 = 01-Jan-2008
B1 = 23-Jan-2008

=B1-A1

Format as General or Number

--
Biff
Microsoft Excel MVP


"aussiegirlone" <(E-Mail Removed)> wrote in message
news:46BEA5B8-8FD1-490E-98B8-(E-Mail Removed)...
> What I am trying to do is calculate the days between accidents. My first
> input date is 01-Jan- 2008 and my next input date is 23-Jan-2008. The days
> inbetween should count "22" if true, or if false then "False"
> PS: I do not want to count from the first inpute date to today, I only
> want
> to count from incident to incident.
> Can anyone help me please



 
Reply With Quote
 
aussiegirlone
Guest
Posts: n/a
 
      2nd Dec 2008
Thankyou for your attempt but Please Note that I mentioned if true then "22"
if false then "false". in other words if no accident occured between or on
either dates then the cell should say false but if an accident occured on
the last input date it should return 22
Can you still help?

"T. Valko" wrote:

> Just subtract:
>
> A1 = 01-Jan-2008
> B1 = 23-Jan-2008
>
> =B1-A1
>
> Format as General or Number
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "aussiegirlone" <(E-Mail Removed)> wrote in message
> news:46BEA5B8-8FD1-490E-98B8-(E-Mail Removed)...
> > What I am trying to do is calculate the days between accidents. My first
> > input date is 01-Jan- 2008 and my next input date is 23-Jan-2008. The days
> > inbetween should count "22" if true, or if false then "False"
> > PS: I do not want to count from the first inpute date to today, I only
> > want
> > to count from incident to incident.
> > Can anyone help me please

>
>
>

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      2nd Dec 2008
You'll need to provide more detail.

How do you know if an accident occured?

--
Biff
Microsoft Excel MVP


"aussiegirlone" <(E-Mail Removed)> wrote in message
news:44388192-935C-4C6C-A71E-(E-Mail Removed)...
> Thankyou for your attempt but Please Note that I mentioned if true then
> "22"
> if false then "false". in other words if no accident occured between or on
> either dates then the cell should say false but if an accident occured on
> the last input date it should return 22
> Can you still help?
>
> "T. Valko" wrote:
>
>> Just subtract:
>>
>> A1 = 01-Jan-2008
>> B1 = 23-Jan-2008
>>
>> =B1-A1
>>
>> Format as General or Number
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "aussiegirlone" <(E-Mail Removed)> wrote in
>> message
>> news:46BEA5B8-8FD1-490E-98B8-(E-Mail Removed)...
>> > What I am trying to do is calculate the days between accidents. My
>> > first
>> > input date is 01-Jan- 2008 and my next input date is 23-Jan-2008. The
>> > days
>> > inbetween should count "22" if true, or if false then "False"
>> > PS: I do not want to count from the first inpute date to today, I only
>> > want
>> > to count from incident to incident.
>> > Can anyone help me please

>>
>>
>>



 
Reply With Quote
 
aussiegirlone
Guest
Posts: n/a
 
      2nd Dec 2008
This is what my data page looks like however I want to be able to calculate
the days between the first accident and the last Accident in the column that
says DAYS SINCE LAST ACCIDENT. If no accident has occured it remains false
I hope this will help you to understand what I want done

Date of Accident Time of Accident Number of Accidents Days Since last
Accident
1/1/2008 12:30:00 PM 1
0
5/1/2008 FALSE FALSE
10/1/2008 FALSE FALSE
12/1/2008 FALSE FALSE
19/1/2008 FALSE FALSE
23/1/2008 5:30:00 PM 1 22


"T. Valko" wrote:

> You'll need to provide more detail.
>
> How do you know if an accident occured?
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "aussiegirlone" <(E-Mail Removed)> wrote in message
> news:44388192-935C-4C6C-A71E-(E-Mail Removed)...
> > Thankyou for your attempt but Please Note that I mentioned if true then
> > "22"
> > if false then "false". in other words if no accident occured between or on
> > either dates then the cell should say false but if an accident occured on
> > the last input date it should return 22
> > Can you still help?
> >
> > "T. Valko" wrote:
> >
> >> Just subtract:
> >>
> >> A1 = 01-Jan-2008
> >> B1 = 23-Jan-2008
> >>
> >> =B1-A1
> >>
> >> Format as General or Number
> >>
> >> --
> >> Biff
> >> Microsoft Excel MVP
> >>
> >>
> >> "aussiegirlone" <(E-Mail Removed)> wrote in
> >> message
> >> news:46BEA5B8-8FD1-490E-98B8-(E-Mail Removed)...
> >> > What I am trying to do is calculate the days between accidents. My
> >> > first
> >> > input date is 01-Jan- 2008 and my next input date is 23-Jan-2008. The
> >> > days
> >> > inbetween should count "22" if true, or if false then "False"
> >> > PS: I do not want to count from the first inpute date to today, I only
> >> > want
> >> > to count from incident to incident.
> >> > Can anyone help me please
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      2nd Dec 2008
Try this:

For the first entry in the "Days Since last Accident" column you'll have to
manually enter a 0. Let's assume that is in cell D2. Then, enter this
formula in cell D3 and copy down as needed:

=IF(C3="",FALSE,A3-LOOKUP(1E100,C$2:C2,A$2:A2))

--
Biff
Microsoft Excel MVP


"aussiegirlone" <(E-Mail Removed)> wrote in message
news:927B5877-1B36-448F-B806-(E-Mail Removed)...
> This is what my data page looks like however I want to be able to
> calculate
> the days between the first accident and the last Accident in the column
> that
> says DAYS SINCE LAST ACCIDENT. If no accident has occured it remains false
> I hope this will help you to understand what I want done
>
> Date of Accident Time of Accident Number of Accidents Days Since last
> Accident
> 1/1/2008 12:30:00 PM 1
> 0
> 5/1/2008 FALSE FALSE
> 10/1/2008 FALSE FALSE
> 12/1/2008 FALSE FALSE
> 19/1/2008 FALSE FALSE
> 23/1/2008 5:30:00 PM 1 22
>
>
> "T. Valko" wrote:
>
>> You'll need to provide more detail.
>>
>> How do you know if an accident occured?
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "aussiegirlone" <(E-Mail Removed)> wrote in
>> message
>> news:44388192-935C-4C6C-A71E-(E-Mail Removed)...
>> > Thankyou for your attempt but Please Note that I mentioned if true then
>> > "22"
>> > if false then "false". in other words if no accident occured between or
>> > on
>> > either dates then the cell should say false but if an accident occured
>> > on
>> > the last input date it should return 22
>> > Can you still help?
>> >
>> > "T. Valko" wrote:
>> >
>> >> Just subtract:
>> >>
>> >> A1 = 01-Jan-2008
>> >> B1 = 23-Jan-2008
>> >>
>> >> =B1-A1
>> >>
>> >> Format as General or Number
>> >>
>> >> --
>> >> Biff
>> >> Microsoft Excel MVP
>> >>
>> >>
>> >> "aussiegirlone" <(E-Mail Removed)> wrote in
>> >> message
>> >> news:46BEA5B8-8FD1-490E-98B8-(E-Mail Removed)...
>> >> > What I am trying to do is calculate the days between accidents. My
>> >> > first
>> >> > input date is 01-Jan- 2008 and my next input date is 23-Jan-2008.
>> >> > The
>> >> > days
>> >> > inbetween should count "22" if true, or if false then "False"
>> >> > PS: I do not want to count from the first inpute date to today, I
>> >> > only
>> >> > want
>> >> > to count from incident to incident.
>> >> > Can anyone help me please
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
aussiegirlone
Guest
Posts: n/a
 
      2nd Dec 2008
This is what my data page looks like however I want to be able to calculate
the days between the first accident and the last Accident in the column that
says DAYS SINCE LAST ACCIDENT. If no accident has occured it remains false
I hope this will help you to understand what I want done


Date of Accident Time of Accident Number of Accidents Days Since last Accident
1/1/2008 12:30:00 PM 1 0
5/1/2008 FALSE FALSE
10/1/2008 FALSE FALSE
12/1/2008 FALSE FALSE
19/1/2008 FALSE FALSE
23/1/2008 5:30:00 PM 1 22


"T. Valko" wrote:

> You'll need to provide more detail.
>
> How do you know if an accident occured?
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "aussiegirlone" <(E-Mail Removed)> wrote in message
> news:44388192-935C-4C6C-A71E-(E-Mail Removed)...
> > Thankyou for your attempt but Please Note that I mentioned if true then
> > "22"
> > if false then "false". in other words if no accident occured between or on
> > either dates then the cell should say false but if an accident occured on
> > the last input date it should return 22
> > Can you still help?
> >
> > "T. Valko" wrote:
> >
> >> Just subtract:
> >>
> >> A1 = 01-Jan-2008
> >> B1 = 23-Jan-2008
> >>
> >> =B1-A1
> >>
> >> Format as General or Number
> >>
> >> --
> >> Biff
> >> Microsoft Excel MVP
> >>
> >>
> >> "aussiegirlone" <(E-Mail Removed)> wrote in
> >> message
> >> news:46BEA5B8-8FD1-490E-98B8-(E-Mail Removed)...
> >> > What I am trying to do is calculate the days between accidents. My
> >> > first
> >> > input date is 01-Jan- 2008 and my next input date is 23-Jan-2008. The
> >> > days
> >> > inbetween should count "22" if true, or if false then "False"
> >> > PS: I do not want to count from the first inpute date to today, I only
> >> > want
> >> > to count from incident to incident.
> >> > Can anyone help me please
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
aussiegirlone
Guest
Posts: n/a
 
      2nd Dec 2008
Thank you very much for your help the formular works beautiful

"T. Valko" wrote:

> Try this:
>
> For the first entry in the "Days Since last Accident" column you'll have to
> manually enter a 0. Let's assume that is in cell D2. Then, enter this
> formula in cell D3 and copy down as needed:
>
> =IF(C3="",FALSE,A3-LOOKUP(1E100,C$2:C2,A$2:A2))
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "aussiegirlone" <(E-Mail Removed)> wrote in message
> news:927B5877-1B36-448F-B806-(E-Mail Removed)...
> > This is what my data page looks like however I want to be able to
> > calculate
> > the days between the first accident and the last Accident in the column
> > that
> > says DAYS SINCE LAST ACCIDENT. If no accident has occured it remains false
> > I hope this will help you to understand what I want done
> >
> > Date of Accident Time of Accident Number of Accidents Days Since last
> > Accident
> > 1/1/2008 12:30:00 PM 1
> > 0
> > 5/1/2008 FALSE FALSE
> > 10/1/2008 FALSE FALSE
> > 12/1/2008 FALSE FALSE
> > 19/1/2008 FALSE FALSE
> > 23/1/2008 5:30:00 PM 1 22
> >
> >
> > "T. Valko" wrote:
> >
> >> You'll need to provide more detail.
> >>
> >> How do you know if an accident occured?
> >>
> >> --
> >> Biff
> >> Microsoft Excel MVP
> >>
> >>
> >> "aussiegirlone" <(E-Mail Removed)> wrote in
> >> message
> >> news:44388192-935C-4C6C-A71E-(E-Mail Removed)...
> >> > Thankyou for your attempt but Please Note that I mentioned if true then
> >> > "22"
> >> > if false then "false". in other words if no accident occured between or
> >> > on
> >> > either dates then the cell should say false but if an accident occured
> >> > on
> >> > the last input date it should return 22
> >> > Can you still help?
> >> >
> >> > "T. Valko" wrote:
> >> >
> >> >> Just subtract:
> >> >>
> >> >> A1 = 01-Jan-2008
> >> >> B1 = 23-Jan-2008
> >> >>
> >> >> =B1-A1
> >> >>
> >> >> Format as General or Number
> >> >>
> >> >> --
> >> >> Biff
> >> >> Microsoft Excel MVP
> >> >>
> >> >>
> >> >> "aussiegirlone" <(E-Mail Removed)> wrote in
> >> >> message
> >> >> news:46BEA5B8-8FD1-490E-98B8-(E-Mail Removed)...
> >> >> > What I am trying to do is calculate the days between accidents. My
> >> >> > first
> >> >> > input date is 01-Jan- 2008 and my next input date is 23-Jan-2008.
> >> >> > The
> >> >> > days
> >> >> > inbetween should count "22" if true, or if false then "False"
> >> >> > PS: I do not want to count from the first inpute date to today, I
> >> >> > only
> >> >> > want
> >> >> > to count from incident to incident.
> >> >> > Can anyone help me please
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      2nd Dec 2008
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"aussiegirlone" <(E-Mail Removed)> wrote in message
news:129E117B-C022-4716-A4D3-(E-Mail Removed)...
> Thank you very much for your help the formular works beautiful
>
> "T. Valko" wrote:
>
>> Try this:
>>
>> For the first entry in the "Days Since last Accident" column you'll have
>> to
>> manually enter a 0. Let's assume that is in cell D2. Then, enter this
>> formula in cell D3 and copy down as needed:
>>
>> =IF(C3="",FALSE,A3-LOOKUP(1E100,C$2:C2,A$2:A2))
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "aussiegirlone" <(E-Mail Removed)> wrote in
>> message
>> news:927B5877-1B36-448F-B806-(E-Mail Removed)...
>> > This is what my data page looks like however I want to be able to
>> > calculate
>> > the days between the first accident and the last Accident in the column
>> > that
>> > says DAYS SINCE LAST ACCIDENT. If no accident has occured it remains
>> > false
>> > I hope this will help you to understand what I want done
>> >
>> > Date of Accident Time of Accident Number of Accidents Days Since
>> > last
>> > Accident
>> > 1/1/2008 12:30:00 PM 1
>> > 0
>> > 5/1/2008 FALSE FALSE
>> > 10/1/2008 FALSE FALSE
>> > 12/1/2008 FALSE FALSE
>> > 19/1/2008 FALSE FALSE
>> > 23/1/2008 5:30:00 PM 1 22
>> >
>> >
>> > "T. Valko" wrote:
>> >
>> >> You'll need to provide more detail.
>> >>
>> >> How do you know if an accident occured?
>> >>
>> >> --
>> >> Biff
>> >> Microsoft Excel MVP
>> >>
>> >>
>> >> "aussiegirlone" <(E-Mail Removed)> wrote in
>> >> message
>> >> news:44388192-935C-4C6C-A71E-(E-Mail Removed)...
>> >> > Thankyou for your attempt but Please Note that I mentioned if true
>> >> > then
>> >> > "22"
>> >> > if false then "false". in other words if no accident occured between
>> >> > or
>> >> > on
>> >> > either dates then the cell should say false but if an accident
>> >> > occured
>> >> > on
>> >> > the last input date it should return 22
>> >> > Can you still help?
>> >> >
>> >> > "T. Valko" wrote:
>> >> >
>> >> >> Just subtract:
>> >> >>
>> >> >> A1 = 01-Jan-2008
>> >> >> B1 = 23-Jan-2008
>> >> >>
>> >> >> =B1-A1
>> >> >>
>> >> >> Format as General or Number
>> >> >>
>> >> >> --
>> >> >> Biff
>> >> >> Microsoft Excel MVP
>> >> >>
>> >> >>
>> >> >> "aussiegirlone" <(E-Mail Removed)> wrote in
>> >> >> message
>> >> >> news:46BEA5B8-8FD1-490E-98B8-(E-Mail Removed)...
>> >> >> > What I am trying to do is calculate the days between accidents.
>> >> >> > My
>> >> >> > first
>> >> >> > input date is 01-Jan- 2008 and my next input date is 23-Jan-2008.
>> >> >> > The
>> >> >> > days
>> >> >> > inbetween should count "22" if true, or if false then "False"
>> >> >> > PS: I do not want to count from the first inpute date to today, I
>> >> >> > only
>> >> >> > want
>> >> >> > to count from incident to incident.
>> >> >> > Can anyone help me please
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Counting days between 2 dates Mike Microsoft Excel Misc 0 19th Sep 2008 10:31 PM
Counting Days between dates Jacinda Microsoft Access Queries 2 7th Mar 2008 01:54 AM
Counting Days Between Dates JerryS Microsoft Excel Worksheet Functions 1 13th Feb 2008 07:37 PM
Counting The days between 2 dates claing Microsoft Access 2 9th Sep 2005 11:58 AM
Counting days between dates =?Utf-8?B?U3VkZGVz?= Microsoft Excel Misc 11 16th Apr 2005 12:02 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:09 PM.