Copying macro

Eliniara

New Member
Joined
Mar 8, 2018
Messages
2
Hey! I am building a worksheet that can be used as a transaction tracker. I have hit a stump trying to have the numbers copy to a new sheet. I would like to create a button that when hit will copy certain cell totals to sheet 3 from sheet 1 onto a new row then clear the totals. I am not sure if this is possible in one macro but this is what I have to copy the totals and to reset them to zero but it doesn't keep the numbers when they are changed.

Worksheets("Sheet1").Range("B2:B9") = 0 (to zero the totals)

Sub CommandButton1_click()
Sheets("Sheet1").Range("A2").Select
ActiveCell.EntireRow.Insert Shift:=xlDown (To insert new row at top of chart)
Sheets("Sheet1").Range("A1:D1").Select
Selection.Borders.Weight = xlThin
End Sub


Sub CopyStuff()
Range("D10").Copy
Sheets("Sheet2").Range("B" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Application.CutCopyMode = False
End Sub
(To copy the totals to sheet 3)

My issue is trying to put them all together without getting an error. Any help would be greatly appreciated!
Thanks!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,224,823
Messages
6,181,179
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