M
Matt S
Hello everyone!
I have a file that is generated on a second-by-second basis. Unfortunately,
it does not give me a time column, rather a 0,1,2,3,... column. It does give
me the start time, however, in this form:
Fri Jan 23 14:13:19 2009 (GMT-05:00).
My macro picks out the 14:13:19 using the Mid function, but after pasting
this to a column, I want to add one second to it and then extend it down for
the entire data set. I am having trouble adding one second to it. Here's my
macro thus far:
Sub TimeDilemma()
Range("D,F:F,H:H,J:J,L:L,N:N,P,R:R,T:T").Delete Shift:=xlToLeft
'Cleans up my data
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
TimeLength = Len(Range("A6").Value)
StartTime = Mid(Range("A6").Value, TimeLength - 24, 8)
Range("A8").Value = StartTime
'make Range("A9") = StartTime + 1 sec then autofill down?
Range("A8:A9").AutoFill Destination:=Range("A8:A" & LastRow)
End Sub
Any help would be greatly appreciated!
THANKS!
I have a file that is generated on a second-by-second basis. Unfortunately,
it does not give me a time column, rather a 0,1,2,3,... column. It does give
me the start time, however, in this form:
Fri Jan 23 14:13:19 2009 (GMT-05:00).
My macro picks out the 14:13:19 using the Mid function, but after pasting
this to a column, I want to add one second to it and then extend it down for
the entire data set. I am having trouble adding one second to it. Here's my
macro thus far:
Sub TimeDilemma()
Range("D,F:F,H:H,J:J,L:L,N:N,P,R:R,T:T").Delete Shift:=xlToLeft
'Cleans up my data
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
TimeLength = Len(Range("A6").Value)
StartTime = Mid(Range("A6").Value, TimeLength - 24, 8)
Range("A8").Value = StartTime
'make Range("A9") = StartTime + 1 sec then autofill down?
Range("A8:A9").AutoFill Destination:=Range("A8:A" & LastRow)
End Sub
Any help would be greatly appreciated!
THANKS!