Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please Help,
I have 2 times say, 08:00:00 & 10:00:00, what i need to do is find out how many 15 min are between 2 times (here there are 8). I have managed this: Range("Ae3").Value = ((Range("ad3").Value - Range("ac3").Value) / 0.25) where d3 = 08:00:00 and c3 = 10:00:00 this gives the answer of 00:08:00. I need to just extract the number 8 so I can use it in a for to nexrt loop, to the show the 15 min intervals between the 2 dates ie 08:15:00, 08:30:00 ,08:45:00 etc. Or is there an easier way? Thanks Dave |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try this instead
Range("Ae3").Value = ((Range("ad3").Value - _ Range("ac3").Value) / TimeValue("00:15")) to illustrate from the immediate window: ? (timevalue("10:00")-timevalue("8:00"))/timeValue("00:15") 8 -- Regards, Tom Ogilvy Dave wrote in message ... Please Help, I have 2 times say, 08:00:00 & 10:00:00, what i need to do is find out how many 15 min are between 2 times (here there are 8). I have managed this: Range("Ae3").Value = ((Range("ad3").Value - Range("ac3").Value) / 0.25) where d3 = 08:00:00 and c3 = 10:00:00 this gives the answer of 00:08:00. I need to just extract the number 8 so I can use it in a for to nexrt loop, to the show the 15 min intervals between the 2 dates ie 08:15:00, 08:30:00 ,08:45:00 etc. Or is there an easier way? Thanks Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Working with times as conditions in formulas | Excel Discussion (Misc queries) | |||
Calculating Non-working Dates and Times | Excel Discussion (Misc queries) | |||
Working With Times / Milliseconds | Excel Worksheet Functions | |||
Working with times | Excel Discussion (Misc queries) | |||
how do i count how many people are working between two times in e | Excel Worksheet Functions |