Conditional Function

S

SluMark

I am trying to calculate overtime hours, but I do not know how to program it.

Something like: IF B3 <= 8, then C3=0 If B3 >8, then C3 = Amount Greater
Than 8
 
P

Pete_UK

Assuming you have decimal hours in those cells (rather than Excel time
formats), try this:

=MAX(0,B3-8)

i.e. if B3 is less than 8 then B3-8 will be less than 0, so the MAX
function will choose 0, but if B3 is greater than 8 then B3-8 will be
greater than 0, so that will be returned instead.

Hope this helps.

Pete
 

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