copy and paste values in another sheet

Roller

Board Regular
Joined
Jan 31, 2005
Messages
113
Hello all,

I've been spinning around on this issue for 2 days now but I just can't seem to get it right. I have a worksheet where users input data, click on radio buttons and select data in named ranges. Based on all of this, formulas record the results in the range z1:af1 in that same sheet.

I plan on having a button that the user can click on to copy and paste values of the range above into another worksheet ("Compiled Results") and clear the input variables (basically resetting the worksheet for another day's work). Each time the values are pasted from "Evaluation Tab", it should populate the next row down. Lastly, I will use pivot tables to extract the info I need.

The portion I cannot get to work is to copy and paste values into the next row of "Compiled Results" sheet. Is there a simple way to make this happen? Thanks a million for any help!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Try this.
Code:
Worksheets("Evaluation tab").Range("Z1:AF1").Copy

Worksheets.Range("A"&Rows.Count).End(xlup).Offset(1).PasteSpecial xlPasteValues
 
Upvote 0
Thanks for the response. I tried this and got a compile error: Method or data member not found. Looking at this, I tried to add a line to select the "Compiled Results" tab then tried to paste the results but got the same error. Don't we have to tell the code where to paste the data?
 
Upvote 0
A typo, of course you need to provide the destination.

Replace Worksheets with Worksheets("Compiled Data") on the 2nd line.

So that would be:
Code:
Worksheets("Evaluation tab").Range("Z1:AF1").Copy
 
Worksheets("Compiled Data").Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteValues
 
Application.CutCopyMode = False
 
Upvote 0
Thanks so much!! This did work. With my limited knowledge of VBA code, I used

Worksheet("Compiled Data").select

to try and select the destination worksheet. I do not have a good method for tracking changes between all my edits, so sometimes its difficult to remember exactly what works and what doesn't. Hopefully others can learn from my shortcomings, but nonetheless, I appreciate your help. Take care.

Roller
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

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