Re: Time Calculation Q
- From: Ron Rosenfeld <ronrosenfeld@xxxxxxxxxx>
- Date: Sun, 24 Apr 2005 15:27:29 -0400
On Sun, 24 Apr 2005 17:40:09 +0100, "John" <john@xxxxxxxxxx> wrote:
>Think I've got the correct formula
>
>=(IF(AND((E16*24)>=4.5,(E16*24)<=5.999999999),0.25,IF(AND((E16*24)>=6,(E16*24)<=7.999999999999),0.5,IF(AND((E16*24)<4.499999999,(E16*24)>0.00001),0,IF((E16*24)>8,0.75,0)))))/24
>
>Its all about multiplying the source by 24
>
>Thanks
>
That's right. Time is stored as a fraction of a day.
A shorter way of writing your formula:
=(IF(E16<4.5/24,0,IF(E16<6/24,0.25,IF(E16<8/24,0.5,0.75))))/24
However, and I think it is an oversight in your formula, look at these series
of results:
Time My Formula Your Formula
7:59 0:30 0:30
8:00 0:45 0:00
8:01 0:45 0:45
Somehow, I don't think you want to see a '0' if the time is exactly 8:00
You also have left undefined any instance where the contents of E16 is
negative. In my formula it will result in a '0'.
--ron
.
- Follow-Ups:
- Re: Time Calculation Q
- From: John
- Re: Time Calculation Q
- References:
- Time Calculation Q
- From: John
- Re: Time Calculation Q
- From: Ron Rosenfeld
- Re: Time Calculation Q
- From: John
- Time Calculation Q
- Prev by Date: Re: useform with flexibel textfield
- Next by Date: Pull Current Month's Data Out of List
- Previous by thread: Re: Time Calculation Q
- Next by thread: Re: Time Calculation Q
- Index(es):
Relevant Pages
|