Forum Discussion

MicaR's avatar
MicaR
Copper Contributor
Aug 12, 2025

Pay times incorrect for calculation

I have start times and end times eg.. B...1156 and C...2330  and I need a formulae for regular hours and overtime; if any.

=IF((C4-B4)<=800,(C4-B4)/100,8)  this works for regular time

IF((C5-B5)>=800,(C5-B5)/100-8,0) give me 2.44 minutes and not 4 minutes for the overtime

I need a formulae to correctly calculate 60 minutes and not up to the 100, which is what is giving the 44

2 Replies

  • Medaliilop's avatar
    Medaliilop
    Iron Contributor

    The main issue is that your subtraction (C4 - B4) is treating times as numbers, not actual time values, which is causing incorrect calculations, especially for overtime.

  • It'd be much easier if you entered the start and end time as real times 11:56 and 23:30

    As it is now, you can use

    =DOLLARFR(MIN(DOLLARDE(C4/100, 60)-DOLLARDE(B4/100, 60), 8), 60)

    and

    =DOLLARFR(MAX(DOLLARDE(C4/100, 60)-DOLLARDE(B4/100, 60)-8, 0), 60)

    By the way, do you need to handle end times after midnight?

Resources