Thread: Tracking Time
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CCS CCS is offline
external usenet poster
 
Posts: 1
Default Tracking Time


This formula is to track the breaks/lunch (time) taken by an employee.
They are entitled to 1hour 30mins total. If they do not take the full
time then the company gains those minutes.
The following formula is being used:
=IF(C16=0,0,IF(LEN(C16)<4,-$P$6,((HOUR(C16)*3600+MINUTE
(C16)*60+SECOND(C16))-$P$6)/60))

Note: (p6) = 1800 and data is entered as hh:mm:ss
The problem is when a zero value is entered (i.e. the employee does not
take his/her break/lunch) it does not give the gained minutes but leaves
it as 0.

Please assist


--
CCS
------------------------------------------------------------------------
CCS's Profile: http://www.excelforum.com/member.php...o&userid=36236
View this thread: http://www.excelforum.com/showthread...hreadid=560180