Woofy_McWoof_Woof
Board Regular
- Joined
- Oct 7, 2016
- Messages
- 60
- Office Version
- 365
- Platform
- Windows
Hi there
I am trying to create a macro/code that will overwrite data each day when a new file arrives
I have a spreadsheet that has a daily forecast for the next month where each day has 48 half hours/rows and 28 columns (including the column for the date/period i.e. dd/mm/yyyy hh:mm).
This forecast is then updated each day for the next day i.e. on the first of the month the forecast is reran for the second of the month etc.
The plan is that I have sheet A acting as the master sheet with sheet B being where i pull the data in from. The idea being that each day the day ahead forecast from sheet B will overwrite the forecast in sheet A (without affecting the other days on either side of the forecast). I'm assuming the code will need to look up the specific date/time entry and then move the data across from sheet B into the corresponding row in sheet A.
I have tried playing around with a few simple copy and paste macros but i can't get round the issue that it overwrites everything and not just the data that's applicable.
I'd appreciate some help from the Excel masters as it is beginning to do my head in Thank you
I am trying to create a macro/code that will overwrite data each day when a new file arrives
I have a spreadsheet that has a daily forecast for the next month where each day has 48 half hours/rows and 28 columns (including the column for the date/period i.e. dd/mm/yyyy hh:mm).
This forecast is then updated each day for the next day i.e. on the first of the month the forecast is reran for the second of the month etc.
The plan is that I have sheet A acting as the master sheet with sheet B being where i pull the data in from. The idea being that each day the day ahead forecast from sheet B will overwrite the forecast in sheet A (without affecting the other days on either side of the forecast). I'm assuming the code will need to look up the specific date/time entry and then move the data across from sheet B into the corresponding row in sheet A.
I have tried playing around with a few simple copy and paste macros but i can't get round the issue that it overwrites everything and not just the data that's applicable.
I'd appreciate some help from the Excel masters as it is beginning to do my head in Thank you
Last edited: