Copy and paste data from a different workbook into a worksheet on a different workbook

ben_sorensen

New Member
Joined
Jun 11, 2015
Messages
44
Hi I have been racking my brain on this one but what I have been trying to do is create a working model that can be used. This requires, in theory, that users get emailed what their store operations should create on a daily basis and then they take that and copy and paste it onto a worksheet in a different excel file, which then takes that data and digests it into actionable information.

Where my hang up is, is that I don't want the users to have to delete yesterdays data and paste in todays data from a different file. I foresee way too many problems.

What I would love for them to do is be able to take the model that they have and (1) have my macro delete all information below line two of that page and then (2) go into the other file and retrieve all the other data from the newer day and populate that page, they would just have to have the file open, and the only difference is the date on the files...example given: store X plan 01-26-2018 and store X plan 01/27/2018.

I have tried multiple things but can't get this to work.

Any ideas?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
So here is the code that has worked the best so far but still isn't doing what needs to be done:

Sub GetDemandPlan1()


With Sheets("Paste Day 1 Demand Plan Here")
.Rows(3 & ":" & .Rows.Count).Delete
End With


Workbooks("Demand 1234 for 01-25-2018.xlsx").Sheets("Demand Planning").Range("A3:DZ250").Copy Range("A3")




End Sub

I have realized what I really need is to have an index match equation incorporated into this, the values that need matched up are in row 2.

Any help would be appreciated.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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