I'm new to excel and am trying to learn and try as much as possible before I ask a question and bother anyone. I am stumped right now.

At my employment, we have a 4 hour overtime minimum. If someone is called in for 2 hours, they are to be paid out at 4 hours compensation. Anything after 4 hours of overtime is hour for hour, if they work 6 hours of overtime, they get comp'd 6 hours.

What I'm attempting to accomplish is to get a cell to do is show the hours of time worked only if it is marked as overtime in another cell. If it is marked overtime, the function should check to see if the hours that were worked are more or less than 4 hours. If it's less than 4 hours, the minimum of 4 hours overtime should be applied. If its more than 4, it should carry over the actual hours logged.

The formula I'm using right now works at inserting the minimum of 4, but it's not doing anything higher than this. If a person worked 6 hours, it has a blank cell.

Here's the formula I'm working with right now: =IF((AND(G12="Yes",E12<=4)),"4:00",IF((AND(G12="Yes",E12>=4)),E12,""))

Here's a screen shot:Capture.PNG

Any help is very much appreciated. Thanks in advance.