Excel Hours

B

Bob Phillips

Hi Kristie,

regular hours =MIN(TIME(8,0,0),(D1-C1)+(B1-A1))
overtime =MAX(0,(D1-C1)+(B1-A1)-E1)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
K

Kristie

The trouble I'm having is this. If a person works from 8am to 5pm that is 8
hours reg. time (with an hour for lunch). If they only work from 9 am to 4
pm the reg time reflected should be 6 hours (giving an hour for lunch). But
if a person works say from 7 am to 5:30 pm it should show 8 hours reg and
1.5 hour overtime. But I can quite figure out how to get the formula to
figure all three of these scenarios.
Here is the formula I am using in the Reg hours column
=IF(ABS(F8-E8+H8-G8)*24<=8,8)
and in the OT hours columns
=IF(I8<8,"",ABS(F8-E8+H8-G8)*24-I8)
Time Hours
AM PM Reg. OT
8:00 AM 12:00 PM 1:00 PM 4:00PM 8 -1
8:00 AM 12:00 PM 1:00 PM 4:00 PM

Thanks so much in advance
 
N

Norman Harker

Hi Kristie!

Thanks to Chip Pearson! It's a superb site and well worth bookmarking
the topics page (see link at bottom of the page I referred you to).

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
Kristie said:
Thank you SOOOO much
 

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

Similar Threads


Top