Is there something like an "If, then" formula?

G

Guest

I am trying to set up a time card that I downloaded from the templates page
on MS. I like the format of the one that I have, but this is what I want it
to do:

Currently it is set up to calculate time for the week as streight time, i.e.
56.4 hours for the week.

What I would like it to do is when the total number of hours reaches 40,
then anything over that goes into another cell for the number of over-time
hours.

Is there a formula that anyone knows that I can use for this, or a function?
 
B

Bob Phillips

use a formula in the other cell of

=MAX(total_time-40,0)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

~working mom~ said:
I am trying to set up a time card that I downloaded from the templates page
on MS. I like the format of the one that I have, but this is what I want it
to do:

Currently it is set up to calculate time for the week as streight time, i.e.
56.4 hours for the week.

What I would like it to do is when the total number of hours reaches 40,
then anything over that goes into another cell for the number of over-time
hours.

Is there a formula that anyone knows that I can use for this, or a
function?
 
G

Guest

The simplest way would be to add 2 columns, normal time and overtime. If
straight time is in F2, then in say G2 enter =IF(F2<=40,F2,IF(F2>40,40,""))
and in H2 enter =IF(F2="","",IF(F2<=40,0,F2-40))
 
G

Guest

Thank you, that works for figuring the weekly overtime out. Do you know how
to make the "total hours" cell stop at 40?

So that I have Regular hours 40 and then in the other cell it show the
number of OT hours? Right now it shows: regular hours 42.5 OT hours 2.5.
 
B

Bob Phillips

Yeah,

=MAX(total_hours,40)

but don't use the result of this in the overtime calculation <vbg>

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 

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

Similar Threads

Excel Vlookup and sumif function maybe a macro issue? 0
Excel Sumproduct 0
If Formula 2
How to add hours and minutes? 5
How to calculate out of hours? 0
Timesheets 2
Complete Novice! Require help with "simple" Excel doc 0
Calculate After hours 3

Top