![]() |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 09:59 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com