To the nearest helper,
I am looking for a method to expand data at a 15 minute timestep to a 1 minute timestep. The goal is to preserve a constant 15 min value (e.g. @ 10:15) for the 15 applicable 1 min timesteps (10:01 - 10:15). Currently I have a macro Do Loop, which duplicates the active row 14 times and inserts it below (between 15 min timesteps). However, this operation performs just one time, so manually running the macro for a week's data is time consuming (See code below)
Can this be automated to proceed through each 15 min timesteps?
Or, is there an alternate way to resolve the main issue? (e.g. using VLOOKUP to reference (e.g.) 10:15 15 times, then move onto 10:30...?)
Thanks for your consideration,
Evan
I am looking for a method to expand data at a 15 minute timestep to a 1 minute timestep. The goal is to preserve a constant 15 min value (e.g. @ 10:15) for the 15 applicable 1 min timesteps (10:01 - 10:15). Currently I have a macro Do Loop, which duplicates the active row 14 times and inserts it below (between 15 min timesteps). However, this operation performs just one time, so manually running the macro for a week's data is time consuming (See code below)
Code:
Sub AddRow_Click()
Do
Dim i As Integer
For i = 1 To 3
Dim insertBelow As Range
Dim wks As Worksheet
Set insertBelow = ActiveCell
Set wks = insertBelow.Worksheet
wks.Range("A1").Select
insertBelow.Offset(1, 0).EntireRow.Insert
insertBelow.EntireRow.Copy
wks.Paste insertBelow.Offset(1, 0).EntireRow
Application.CutCopyMode = False
Next i
Exit Do
Loop
End Sub
Or, is there an alternate way to resolve the main issue? (e.g. using VLOOKUP to reference (e.g.) 10:15 15 times, then move onto 10:30...?)
Thanks for your consideration,
Evan