#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 207
Default Time

I hope someone can point me in the right direction.
I am looking for a sub routine that gets input from the main program from
cells D2 & F2(these are formated m/dd/yy hh:mm). To fill-in cells B5 through
the end of time interval, in one minute intevals. The legnth of time will
vary.

TIA
:-)
Dennis
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Time

Can we assume that D2 is the beginning date/time andF2 is the ending
date/time?


"FloMM2" wrote:

I hope someone can point me in the right direction.
I am looking for a sub routine that gets input from the main program from
cells D2 & F2(these are formated m/dd/yy hh:mm). To fill-in cells B5 through
the end of time interval, in one minute intevals. The legnth of time will
vary.

TIA
:-)
Dennis

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Time

Sub FillTimes()
Dim iCt As Integer
Dim iMax As Integer
iMax = 60 * 24 * (Range("F2") - Range("D2"))
Do
Range("B" & 5 + iCt) = Range("D2") + iCt / (24 * 60)
iCt = iCt + 1
Loop Until iCt = iMax + 1
Range("B2:B" & 5 + iMax).NumberFormat = "m/d/yyyy h:mm"
End Sub

Hth,
Merjet


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 207
Default Time

Merjet,
Sorry it took so long to get back to you.
The sub routine is pretty close to what I need, I am in the process of
tweaking it a little for a perfect fit.
Once again, THANKS.
:-)


"merjet" wrote:

Sub FillTimes()
Dim iCt As Integer
Dim iMax As Integer
iMax = 60 * 24 * (Range("F2") - Range("D2"))
Do
Range("B" & 5 + iCt) = Range("D2") + iCt / (24 * 60)
iCt = iCt + 1
Loop Until iCt = iMax + 1
Range("B2:B" & 5 + iMax).NumberFormat = "m/d/yyyy h:mm"
End Sub

Hth,
Merjet



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
Time calculations for Scheduled Time vs. Actual Time Worked The Caterer Excel Discussion (Misc queries) 1 November 29th 09 08:08 AM
straight time, time and a half, and double time Jeremy Excel Discussion (Misc queries) 3 September 23rd 08 09:03 PM
Calculate Ending time using Start Time and Elapsed Time Chief 711 Excel Worksheet Functions 5 May 13th 08 04:34 PM
Converting date/time serial values to cumulative time totals... Kevin B Excel Discussion (Misc queries) 4 October 18th 07 05:05 PM
Calculating days & time left from start date/time to end date/time marie Excel Worksheet Functions 7 December 7th 05 02:36 PM


All times are GMT +1. The time now is 07:29 AM.

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

About Us

"It's about Microsoft Excel"