Macro and pasting between sheets

MoeFaux

New Member
Joined
Oct 28, 2002
Messages
1
I have a daily inventory sheet that keeps track of sales of 12 different items. I want to create a macro that will copy the date, the total sales, and the number of each item sold to a second worksheet, so I can have running inventory totals.

I started recording a macro, copied my first field, went to the second worksheet, but it wouldn't let me paste. What might I be doing wrong?

It also seems like this problem would have been solved many times before, but I couldn't find any samples on the web.

Any help would be extremely appreciated.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
Say you want to copy just the values (not the formulas, formats etc...) from Sheet1 A2:A10 to Sheet2 range B1

Sheets("Sheet1").select
Range("a2:a10").copy
Sheets("sheet2").select
Range("b1").pastespecial xlpastevalue
Sheets("sheet1").select
 

Forum statistics

Threads
1,143,613
Messages
5,719,716
Members
422,242
Latest member
hishamkhatri

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
Top