2008/10/2 Cor Nouws <[EMAIL PROTECTED]>:
> Hi *,
>
> Working with times and numbers.
> Column F is the result of hours*tarif
>
> A      B       C       D      F
>
> 12:00  14:00   A-B     25     D*C*24
>
>  in fact, F13 holds =HOUR(C13)*D13+MINUTE(C13)*D13/60)
>  this for in case B is at the next day
> Results C > 02:00 and F > 50, so this works fine.
>
> However
> 20:00  20:00   0O:00   25      0,0
>
> I did some other trials, but am a bit lost here.
>
> Any advice?
> Thanks,
> Cor
>

It looks right to me. 20:00 - 20:00 = 0. 0*25*24=0

If you want to assume that the second 20:00 is the next day, then use
an IF statement, such as if C=0 then C=24. But what would you do when
someone works 25 hours? How would you differentiate that from 1 hour?
Therefore I would advise you to do one of two things:
1) Include the date as Joe suggested.
2) Convert the times to datetime, store that internally and make your
calculations off of it, but display only the time. That might be a bit
complicated for a spreadsheet app, though.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

ä-ö-ü-ß-Ä-Ö-Ü

Reply via email to