Copy/Paste in next open row

Foxy Lady

New Member
Joined
Feb 25, 2009
Messages
41
Hi there, I wonder if any one can assist.

I need to created a botton to copy and paste a certain range to next availible row on that sheet.

Also I need a message box to appear asking to enter criteria and that criteria should be entered into a specific cell (etc A32). This cell also falls under the copy range and will need to be adjust when it is copied again. This is the first cell in the copy range.

I hope you can help

Regards
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Some ideas to get you started:
Code:
Sub Copytest()
Dim NR As Long, MyStr As String
NR = Range("A" & Rows.Count).End(xlUp).Row + 1   'change row used if A is unreliable for finding last row

MyStr = Application.InputBox("Enter Criteria", "Info needed")
Range("A32") = MyStr

Range("A32:K32").Copy
Range("A" & NR).PasteSpecial xlPasteValues    'or xlPasteAll

End Sub

These methods would work in a commandbutton as well.
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,192
Members
449,072
Latest member
DW Draft

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