Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
time calculation using IF function
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? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
time calculation using IF function
Well, you could try
=IF(C11<="08:08"+0,"8:00"+0,"8:15"+0) format as h:mm AM/PM but what happens if c11 is 07:00 or 09:00? I know it won't give quite the same result but what about =ROUND(C11*96,0)/96 to round to the nearest quarter hour "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? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
time calculation using IF function
Thank you! The rounding work great.
I really appreciate your help. Polly "daddylonglegs" wrote: Well, you could try =IF(C11<="08:08"+0,"8:00"+0,"8:15"+0) format as h:mm AM/PM but what happens if c11 is 07:00 or 09:00? I know it won't give quite the same result but what about =ROUND(C11*96,0)/96 to round to the nearest quarter hour "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? |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
time calculation using IF function
"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? |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Time Calculation For A Timesheet To Include Lunch | Excel Worksheet Functions | |||
Time Calculation | Excel Worksheet Functions | |||
Hyperlink function without openening new Explorer every time | Excel Worksheet Functions | |||
TIME function used in Excel | Excel Worksheet Functions | |||
Time Calculation | Excel Worksheet Functions |