Trying to calculate hours worked on timecard using "IF" command

M

Melissa

I have total hours in cell M11. In cell M13 I have a formula calculating
overtime hours: =IF(M11>40,M11-40,0). What I'm trying to do is cause the
cell with this formula to calculate the hours ONLY if the overtime hours are
over 40 AND outside of PTO and/or Holiday hours.

Here's an example:

total hours (cell M12)= 42.33
overtime hours (cell M13)= 2.33
PTO hours (cell M14) = 8.00
Holiday hours (cell M15) = 8.00

Total work hours INCLUDES pto and holiday hours, so overtime hours should
NOT be showing 2.33, but rather zero.

How do I create/modify my current formula (above) to calculate this properly?

Thanks!

Melissa
 
M

Melissa

Ok, but if the 42.33 hours WERE regular worked hours (not including PTO or
holiday), how do I make the formula look right with the other part of the
formula {eg =IF(M11>40,M11-40,0)}? Where do I put all the parethesis,
commas, etc? How do I put both formulas together so that both calculations
take effect?
 
M

Melissa

Shane,
Thank You, Thank You!! Your formula worked! You've just saved my bacon!

Melissa
 
M

Mike H

Hi,

You clearly never tried this formula which returns exactly the same answer
as Shane's much longer version.

Mike
 

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