Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date comparision in Excel (somebody please help)

Status
Not open for further replies.

21MSU

Technical User
Mar 10, 2003
4
US
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

2/18/2003 1:00:00 AM
2/19/2003 12:30:00 PM

C-60.xls (Sheet1)

2/20/2003 11:00:00 AM
2/18/2003 1:00:00 AM

C-60.xls (Sheet2)
2/21/2003 1:00:00 AM
2/17/2003 12:00:00 AM

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 greater (more current) and paste that data on the UnitConditions1.xls page in chronological order. Then it should go to Sheet1 find a more current date and paste it on UnitCondition1.xls.

Is there any simple way to build a macro to accomplish this? Please help me out!
Thanks!
 
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

2/18/2003 1:00:00 AM
2/19/2003 12:30:00 PM

C-60.xls (Sheet1)

2/20/2003 11:00:00 AM
2/18/2003 1:00:00 AM

C-60.xls (Sheet2)
2/21/2003 1:00:00 AM
2/17/2003 12:00:00 AM

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 greater (more current) and paste that date on the UnitConditions1.xls page in chronological order. Then it should go to Sheet1 find a more current date and paste it on UnitCondition1.xls.

Is there any simple way to build a macro to accomplish this? Please help me out!
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top