Overwrite data

Woofy_McWoof_Woof

Board Regular
Joined
Oct 7, 2016
Messages
60
Office Version
  1. 365
Platform
  1. 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
 
Last edited:

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top