If's, ands, or buts - I've tried them all.


Posted by Sandana on January 18, 2002 11:04 PM

I'm working on a summary time sheet that gives total time and pay rates. I've got everything completed except for one cell that I'm having a conniption fix over! I've tried to be logical in figuring this out but I must not be holding my tongue right or something :)

Cell H7 gives a value of total time in the format of 00:00:00.

I want the cell G7 to do this:
1. If H7 < 40:00:00 then leave zero value in the format of 00:00:00.
BUT
2. If H7 > 40:00:00 then subtract 40:00:00 and put the difference in cell G7.

Can anyone please help me with this formula? Your responses are much appreciated.

Sandana



Posted by Aron on January 19, 2002 12:33 AM

Try this...

Put 40:00:00 in a cell (formatted as time); we'll use I2. You can hide this cell if you need to.

In cell G47, use this:

=If(G47>$I$2,G47-$I$2,G47)

This should work. Good Luck!

different (hidden) cell, then just do