I am trying to bulid a macro to update a spreadsheet. The macro should open up a workbook, select the sheet and find a date that is higher (more current) than the last date on the main page. For instance
UnitConditons1.xls
Date VIS COLOR API SULFUR
2/18/2003 1:00:00 AM 20 3 40 3
2/19/2003 12:30:00 PM 25 3 41 4
C-60.xls (Sheet1)
2/20/2003 11:00:00 AM 30 5 32 3
2/18/2003 1:00:00 AM 20 4 33 3.5
C-60.xls (Sheet2)
2/21/2003 1:00:00 AM 23 4 32 3
2/17/2003 12:00:00 AM 20 3 35 4
In this example, the macro should take the last date on UnitConditions1.xls (2/19/2003 12:30:00 PM) and then open up C60.xls (Sheet2)and go through the dates to find a date(s) greater (more current) and paste that date and respective data on the UnitConditions1.xls page right below the 2/19/2003 12:30:00 PM in chronological order. Then it should go to C60.xls (Sheet1) find a more current date and paste it on UnitCondition1.xls. If there are no more current dates then the nothing gets pasted.
Is there any simple way to build a macro to accomplish this? Please help me out!
Thanks!
UnitConditons1.xls
Date VIS COLOR API SULFUR
2/18/2003 1:00:00 AM 20 3 40 3
2/19/2003 12:30:00 PM 25 3 41 4
C-60.xls (Sheet1)
2/20/2003 11:00:00 AM 30 5 32 3
2/18/2003 1:00:00 AM 20 4 33 3.5
C-60.xls (Sheet2)
2/21/2003 1:00:00 AM 23 4 32 3
2/17/2003 12:00:00 AM 20 3 35 4
In this example, the macro should take the last date on UnitConditions1.xls (2/19/2003 12:30:00 PM) and then open up C60.xls (Sheet2)and go through the dates to find a date(s) greater (more current) and paste that date and respective data on the UnitConditions1.xls page right below the 2/19/2003 12:30:00 PM in chronological order. Then it should go to C60.xls (Sheet1) find a more current date and paste it on UnitCondition1.xls. If there are no more current dates then the nothing gets pasted.
Is there any simple way to build a macro to accomplish this? Please help me out!
Thanks!