Jon Melone
Board Regular
- Joined
- Mar 10, 2008
- Messages
- 109
Hi,
I have workbook ("download.xls") that is over-written every Monday morning by an export from a database. In a second workbook ("report.xls"), I have a macro that copies the new data from the download workbook and appends it to existing data in the report workbook.
Once the new data is added, a pivot table automatically updates along with other formulas in other tabs.
However,
everytime the macro runs, the same data is appended over and over again. How do I evaluate that the new data for the current week has already been added and the macro should be disabled until the next week?
Also,
it is not uncommon that the dowload from the database is incomplete, so after running the macro, a day or two later, I need to delete the data that's been added and re-run the macro against a fresh download. Just need to make sure the macro can be reenabled for this instance.
The only idea I have so far is to use messages to warn the user to double-check the dates before running the macro (compare sysdate to most recent date in the download).
Any thoughts on a more robust approach?
Jon
I have workbook ("download.xls") that is over-written every Monday morning by an export from a database. In a second workbook ("report.xls"), I have a macro that copies the new data from the download workbook and appends it to existing data in the report workbook.
Once the new data is added, a pivot table automatically updates along with other formulas in other tabs.
However,
everytime the macro runs, the same data is appended over and over again. How do I evaluate that the new data for the current week has already been added and the macro should be disabled until the next week?
Also,
it is not uncommon that the dowload from the database is incomplete, so after running the macro, a day or two later, I need to delete the data that's been added and re-run the macro against a fresh download. Just need to make sure the macro can be reenabled for this instance.
The only idea I have so far is to use messages to warn the user to double-check the dates before running the macro (compare sysdate to most recent date in the download).
Any thoughts on a more robust approach?
Jon