Here is my current time formula:
=((C6-C5)*24)+((C8-C7)*24)
C5 = time in
C6 = time out
C7 = time in
C8 = time out
Thank you in advance!!
Meghan
I have the following formula. But there's probably a better solution (i.e.
not involving the Analysis Toolpak):
=DOLLARDE((D6-D5+D8-D7)/100,60)
Regards,
Daniel M.
"Meghan Baker" <ab...@hotmail.com> wrote in message
news:7570f8e3.02082...@posting.google.com...
Without the Analysis Toolpak:
=INT((D6-D5+D8-D7)/100)+MOD(D6-D5+D8-D7,100)/60
Regards,
Daniel M.
"Daniel.M" <daniel...@bigfoot.com> wrote in message
news:#gQFSEvSCHA.4240@tkmsftngp08...
cheers
"Daniel.M" <daniel...@bigfoot.com> wrote in message
news:O0RarfvSCHA.2556@tkmsftngp09...
This array formula (ctrl-shift-enter) seems to work better:
=SUM((INT(C5:C8/100)+MOD(C5:C8,100)/60)*{-1;1;-1;1})
Regards,
Daniel M.
"merlot" <g...@hunterwine.com> wrote in message
news:#SuDQEwSCHA.2024@tkmsftngp08...
Let's say the times are 0730, 1145, 1230, and 1600. Your formula gives 8.416666 hours.
OTOH, converting each of the 4 values into a time in column E, with the formula
=TIME(INT(D5/100),MOD(D5,100),0)
and applying the formula
=(E6-E5+E8-E7)*24
gives 7.75, which is correct.
I believe the problem with the sample times is that subtracting 1230 from 1600 gives 370. To get
the correct total, that subtraction must yield 330 = 3.5 hours.
The least cumbersome (IMO) formula requires the DOLLARDE function from the ATP, as already
described by another respondent:
=DOLLARDE(C6/100,60)-DOLLARDE(C5/100,60)+DOLLARDE(C8/100,60)-DOLLARDE(C7/100,60)
Yep, and so my 2 first formulas were all wrong ;-(
Altough I stand by my last effort ;-)),
i.e. the array formula previously published in this thread (knowing it
capitalizes on the fact the data is in 4 contiguous vertical cells).
Thanks for the heads-up and the info. Have a nice day.
Daniel M.
"Myrna Larson" <myrna...@charter.net> wrote in message
news:qkpfmukuisv61l849...@4ax.com...
"Daniel.M" <daniel...@bigfoot.com> wrote in message news:<OVwTCDzSCHA.1468@tkmsftngp11>...
> Appreciate your feedback. Indeed, the second formula (without the Analysis
> Toolpak) is wrong.
"Daniel.M" <daniel...@bigfoot.com> wrote in message news:<O0RarfvSCHA.2556@tkmsftngp09>...
It doesn't produce the correct results. Try it with the following data :
730
1145
1230
1600
Correct result is 7.75.
Formula produces 8.416666667 as Merlot pointed out.
You want to use either :
=SUM((INT(C5:C8/100)+MOD(C5:C8,100)/60)*{-1;1;-1;1}) ' array formula
(ctrl-shift-enter)
Please also note that if you're using the Analysis Toolpak, the correct
formula (as pointed out by Myrna) is :
=DOLLARDE(C6/100,60)-DOLLARDE(C5/100,60)+
DOLLARDE(C8/100,60)-DOLLARDE(C7/100,60)
Regards,
Daniel M.
"Meghan Baker" <ab...@hotmail.com> wrote in message
news:7570f8e3.0208...@posting.google.com...
Or this combination of Myrna's and Daniel's formulae:
=SUMPRODUCT(TIME((C5:C8/100),MOD(C5:C8,100),0)*{-1;1;-1;1})
Not array-entered.
Format the cell as "Time".
--
Best regards
Leo Heuser
MVP Excel
"Meghan Baker" <ab...@hotmail.com> skrev i en meddelelse
news:7570f8e3.02082...@posting.google.com...
Thanks!
Meghan
"Daniel.M" <daniel...@bigfoot.com> wrote in message news:<#AOWUaUTCHA.3736@tkmsftngp11>...