Click Macro button to Paste in corresponding Sheet

MWhiteDesigns

Well-known Member
Joined
Nov 17, 2010
Messages
646
Office Version
  1. 2016
Platform
  1. Windows
Good morning Guys!
Back again. I have another test for you guys.

I have a Workbook, a sheet on this workbook looks up information based on what is inputted in a cell. This information is displayed in a row of cells. There is a macro button I created that when clicked, it will copy all the information in these cells. The code is shown below.

Code:
Sub AR_Form_Copy()
'
' AR_Form_Copy Macro
' Macro recorded 7/7/2010 by ayv814
'

'
    Range("A15:R15").Select
    Selection.Copy
    Selection.End(xlUp).Select
    Selection.End(xlUp).Select
    Selection.End(xlUp).Select
End Sub
Is there a way to make the macro button perform as such:

When clicked, it will copy selected cells, then automatically paste it in say worksheet "AR" starting at row 21. If it is clicked again, it will paste in the next available row. Does that make sense?

OR

Same action, slightly different result.

When clicked, it will copy selected cells, then automatically paste it in a completely different workbook in worksheet "AR" starting at row 21. If it is clicked again, it will paste in the next available row. Does that make sense?

As always, thanks in advance!
 
Last edited:

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.
I've poked around the search area for about an hour now. I've tried some stuff here and there but nothing seems to be working. I'm still a baby to excel. Any help would be nice.
 
Upvote 0

Forum statistics

Threads
1,224,584
Messages
6,179,687
Members
452,938
Latest member
babeneker

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