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

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.
 
S

Stefi

Use
TIME(8,0,0)
instead of "8:00" string!

Regards,
Stefi

„Thanks†ezt írta:
 

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

Top