How do I calculate the number of hours worked, by only entering s.

F

Four

I am trying to calculate the number of hours each employee worked during a
particular shift. I want to enter the time they start and the time they
finish, and have excel tell me how many hours that equates to. I have tried
using some examples in the online help, but they only seem to work in very
specific conditions.
 
M

Myrna Larson

With start time in A1 and end time in B1

=MOD(B1-A1,1)

and format as time.

Or =B1-A1+(B1<A1)

This assumes you have only the time (i.e. not date and time) in the two cells.
The last part of the formulas( (B1<A1) or the MOD function) take care of the
situation where the time span crosses midnight, in which case B1 is less than
A1 and simple subtraction gives a negative number.

If you do include the dates, just subtract the two cells.
 

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