hours before midnight

G

Guest

ok, I am trying to calculate my hours worked starting before midnight and finishing the next day by my hourly wage. But I run into a problem with the 24 hour clock when I input the data
As long as its the same day I haveno problems

cell (a1 formatted as time) 23:00 hrs toda
cell (b1 formattedas time) 04:00 hrs tomorro
cell (c1 formatted as time) b1-a1 should equal 5hrs but it doesn
cell (d1 formatted at currency) c1*1440/60*13.85 should equal $66.7

any ideas?
 
P

Peo Sjoblom

Try

=MOD(B1-A1,1)*24*13.85

or the slightly more intuitive

=(B1-A1+(B1<A1))*24*13.85

note that you have to format result as currency or number or general or else
you probably get a time format

Maybe you also want to round the result to the nearest penny?

=ROUND(MOD(B1-A1,1)*24*13.85,2)



--

Regards,

Peo Sjoblom

Michael said:
ok, I am trying to calculate my hours worked starting before midnight and
finishing the next day by my hourly wage. But I run into a problem with the
24 hour clock when I input the data.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top