Need formula

[Closed]
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
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 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
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 ("")