View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Teethless mama Teethless mama is offline
external usenet poster
 
Posts: 3,718
Default time calculation using IF function

=IF(MINUTE(A1)<9,TIME(HOUR(A1),,),TIME(HOUR(A1),15 ,))

Format as h:mm AM/PM

"Polly" wrote:

I am trying to write a function that calculates a time card

I want to "say" that if you punch in between 8:00 am and 8:08 am, the time
will read 8:00 am, if it is 8:09 am, then the time will read 8:15 am.

I tried: c11<=08:08, 8:00 am, 8:15 am but it does not work.

Any thoughts?