Thread: If Formula
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default If Formula

A1 = 10:00
B1 = 22:00

In C1 try the below formula

=IF(B1-A1TIMEVALUE("07:00"),B1-A1-TIMEVALUE("00:30"),B1-A1)

If this post helps click Yes
---------------
Jacob Skaria


"gadgetman" wrote:

Hi I an trying to generate a formula to enable my wife to calculate the off
duty for her section.
i have used 3 cells to start off with just to see if i could get it to work,
cell 1 = start time, Cell 2 = end time, Cell 3 = total.
e.g. start time =08.00, end time =13:00, then total time = 5hrs, formula say
=sum(d3-d2) simple. Ok
Well this is the part were i have got stuck. If the total is equal or more
than 7 hours then i need to subtract 0.5hr, but only if it is equal or
greater
so say start time is 10:00, end time is 22:00 then is should = 11.5 and not
12 hrs as the sum is greater than 7hrs
Can some kind person out there help with the formula

cheers