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

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
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,214,530
Messages
6,120,071
Members
448,943
Latest member
sharmarick

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