how to compare time in hh:mm format using IF function?

  • Thread starter Thread starter Thanks
  • Start date Start date
T

Thanks

Sir,
This is a sample of worksheet.
D
6 4:00 AM
7 11:00 AM

And I have to subtract time using IF function and tried these syntexes
=IF(D6<"8:00",("8:00"-D6), IF(D6>"8:00 AM", (D6 - "8:00"), "OK")) and
=IF(D6<"8:00", "LESS", IF(D6>"8:00", "MORE", "OK")) and
=IF(D6<"8:00",("8:00"-D6), (MOD(D6-"8:00",1)))

But in all cases i found an error. I have to calculate the less time and
over time by an employee.

Please Suggest me. I have been tring it for 7-8days.
 
Back
Top