Figuring out hours worked

M

Matt

In cell F3 I am trying to get the hours work from the start time in cell D3
and the finish time in E3. I can not locate the forulma for this?
 
C

Chip Pearson

You can subtract the start time from the end time and then multiply
the difference by 24. E.g.,

=(E3-D3)*24

If it is possible that the start time is greater than the end time
(e.g., crossing Midnight, start and 10PM and end at 3AM) use formula
like the following:

=(E3-D3+(D3>E3))*24

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
T

T. Valko

Try one of these:

=IF(COUNT(D3:E3)=2,E3-D3,"")

If the end time might span past midnight:

=IF(COUNT(D3:E3)=2,MOD(E3-D3,1),"")

Format as h:mm
 
M

Matt

That worked thanks alot

Chip Pearson said:
You can subtract the start time from the end time and then multiply
the difference by 24. E.g.,

=(E3-D3)*24

If it is possible that the start time is greater than the end time
(e.g., crossing Midnight, start and 10PM and end at 3AM) use formula
like the following:

=(E3-D3+(D3>E3))*24

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

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