Need formula

Closed
frisch - Jul 9, 2010 at 08:05 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jul 9, 2010 at 11:38 PM
Hello,
I need a formula in excel that will calculate overtime if certain criteria is in another cell is met.

Example: If Cell A1 contains O then calcuate any hours over 40 as overtime. If Cell A1 contains P then don't calculate hours over 40.


1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jul 9, 2010 at 11:38 PM
There is not enough information

this should give you good idea
=IF(AND(A1="O", B1>40), B1-40, "")

This says
if A1 =O and b1 is more than 40 hours, then OT will be b1-40
If A1 not equal to O OR B1 is less than 40, then show blank ("")
0