Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Working with times

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Working with times

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Working with times as conditions in formulas NDBC Excel Discussion (Misc queries) 2 July 2nd 09 08:20 AM
Calculating Non-working Dates and Times watermt Excel Discussion (Misc queries) 6 April 29th 09 08:34 PM
Working With Times / Milliseconds Carl Excel Worksheet Functions 1 December 7th 06 05:03 AM
Working with times Pendelfin Excel Discussion (Misc queries) 5 February 4th 06 10:01 PM
how do i count how many people are working between two times in e APYDS Excel Worksheet Functions 4 August 16th 05 08:11 PM


All times are GMT +1. The time now is 12:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"