set a minimum value for a cell
a1= start time 08:00
b1 = end time 12:00
d1 = 4:00
all formatted as [hh]:mm
formula
=MAX(B1-A1,$D$1)
will return the maximum of the time difference and 4 hrs. Its best to keep
the 4hr constant in a cell in case you want to change it in which case you
only alter a single cell.
Mike
"Nevets" wrote:
I have a sheet with two times, and a formula to figure out how much to
charge, depending on the difference between those two times. I would like to
set a minimum of 4 hours, such that no matter what two times are entered, if
they are less than four hours apart, the result will be 4 hours, but if they
are anything more than 4 hours apart, the result will be the actual
difference.
|