Need simple code copy/paste code

vt804boy

New Member
Joined
Jul 31, 2009
Messages
7
All I want to do is copy a range of cells and paste them in another spreadsheet in a specific location. Does anybody have a code that will do this. It seems simple but I am new at this. Thanks help neeeeed:warning:
 
sheets("your sheet name").range("your range").copy sheets("where to paste").range("your range")
 
Upvote 0
Ok thanks, now will this work even if its in a different file. Because I have 1 sheet that is sent to me named "Food List", it is huge and I do not need all the information that it has and I need to copy and paste certain things from it into my own inventory list called "Inventory List" which is a different file all together.

Thanks:warning:
 
Upvote 0
While you have both files open:

Code:
workbooks("Food List").sheets("your sheet name").range("your range").copy workbooks("Invetory List").sheets("where to paste").range("your range")
 
Upvote 0
In the workbook where you want it to run from ("inventory List").

Open VBE by pressing Alt - F11
On the left side you will see the files that you have open
Under the file name, right click on the name and insert a module
In the VBE window type in

sub NameOfYourSub()

Paste the code here

End Sub
 
Upvote 0

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