Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this:
Sub insbetw() Dim oc As Range loopcount = Range("A" & Rows.Count).End(xlUp).Row - 2 aktsor = 2 For l = 1 To loopcount Set oc = Range("A" & aktsor) oc.Select diff = Round(((Range("A" & oc.Row + 1) + Range("B" & oc.Row + 1)) - (oc + Range("B" & oc.Row))) * 24 * 60, 0) - 1 Rows(oc.Row + 1 & ":" & oc.Row + diff).Select Selection.Insert Shift:=xlDown For i = oc.Row + 1 To oc.Row + diff Range("A" & i).Value = oc.Value Range("B" & i).Value = Range("B" & i - 1) + TimeSerial(0, 1, 0) Range("C" & i).Value = 0 Next i aktsor = aktsor + diff + 1 Next l End Sub -- Regards! Stefi Vebjørn ezt *rta: Hello I work on a time series in Excel that should be used in the EPA SWMM. (Storm water modelling) Eks of the series: Date (D/M/Y) Time(H:M) Value (mm) 06/05/2002 00:35 0.2 06/05/2002 02:43 0.2 06/05/2002 03:26 0.2 06/05/2002 03:39 0.2 06/05/2002 04:03 0.2 06/05/2002 04:12 0.2 06/10/2002 01:07 0.2 I need to have values for every minute. Sow i need to insert a row between the eksisting times. Eks from 00:35 to 02:45 i need 129 rows whit the same date, one more minute added and the value 0 Eks: 06/05/2002 00:36 0.0 06/10/2002 00:37 0.0 Hope for some answers!!!! -- H. V. Kristoffersen |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
passing arguments from an excel macro to a word macro | Excel Discussion (Misc queries) |