Merging two files with different time stamps
This is what I have...
First file: Time Time (min) Temp FTIR Data 2:33:52 0 250 8326 2:33:53 0.01668 250 9245 etc Second File: Time Time (sec) Time (min) MS Data 2:33:42.51703 0 0 344 2:33:43.22508 1.70805 0.02847 365 etc. I need to match up the time stamp between the two files because my FTIR data also has the temperature data, which my Mass Spec (MS) file doesn't. As you can see, the Mass Spec file has a very random time stamp, which I work out the number of seconds. So, is there a way to combine the two files using possibly the number of minutes/seconds of the test in a macro? If I go that route, I have to make excel realize when both start. Any help would be greatly appreciated! Thanks, Matt |
Merging two files with different time stamps
This is what I've come up with so far comparing the second data... the
runtime is a little slow, but it works. Dim LastRow As Long LastRow = Cells(Rows.Count, "N").End(xlUp).Row i = 22 Do While i < LastRow If Range("O" & i).Value < Range("D" & i).Value Then Range("N" & i & ":Q" & i).Delete Shift:=xlUp LastRow = Cells(Rows.Count, "N").End(xlUp).Row Else: i = i + 1 End If Loop Now I have to figure out how to match up the initial times. Anyone know how to speed up the calculations above? Thanks, Matt "Matt S" wrote: This is what I have... First file: Time Time (min) Temp FTIR Data 2:33:52 0 250 8326 2:33:53 0.01668 250 9245 etc Second File: Time Time (sec) Time (min) MS Data 2:33:42.51703 0 0 344 2:33:43.22508 1.70805 0.02847 365 etc. I need to match up the time stamp between the two files because my FTIR data also has the temperature data, which my Mass Spec (MS) file doesn't. As you can see, the Mass Spec file has a very random time stamp, which I work out the number of seconds. So, is there a way to combine the two files using possibly the number of minutes/seconds of the test in a macro? If I go that route, I have to make excel realize when both start. Any help would be greatly appreciated! Thanks, Matt |
All times are GMT +1. The time now is 03:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com