Cut and paste VBA or copy and paste

NewbieMike

New Member
Joined
May 29, 2015
Messages
5
Hello, on a daily basis, I will have a random number of rows(it will always be A2:AD??) entered on "sheet1" and would like to either cut and paste or copy and paste that range to the first available row on "sheet2". I have been searching the forums all day and can't seem to find what I'm looking for. Can anyone help please? I appreciate any and all help! :)
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hello, on a daily basis, I will have a random number of rows(it will always be A2:AD??) entered on "sheet1" and would like to either cut and paste or copy and paste that range to the first available row on "sheet2". I have been searching the forums all day and can't seem to find what I'm looking for. Can anyone help please? I appreciate any and all help! :)

A simple solution assuming there are no gaps in data would be (paste values also)
sub XXX ()

Sheets("sheet1").activate
Range("A2:AD2").select
Range(selection, selection.end(xlDown)).select

Selection.Copy

Sheets("sheet2").activate

range("A1").select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
end sub

hope this helps
 
Upvote 0
kasanari, I changed the end to paste to the first available cell on "Sheet2" but the rest worked beautifully!!! Thank you so much, you are awesome!!!;)
 
Upvote 0

Forum statistics

Threads
1,217,332
Messages
6,135,941
Members
449,974
Latest member
riffburn

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