Insert copied cells as value

afountas

New Member
Joined
Jul 15, 2011
Messages
20
Need a macro to Copy cells from sheet1 (row 2) and "insert copied cells"(which would create a new row) as a value in sheet2 (row 2).

Any help??
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
is this what you want?

Code:
Sub TEST()
With Worksheets("sheet1")
.Range("a2").EntireRow.Copy
With Worksheets("sheet2")
.Range("a2").PasteSpecial xlPasteValues
End With
End With
End Sub
 
Upvote 0
Since you want to "insert copied cells(which would create a new row)" try

<font face=Courier New><br><br><SPAN style="color:#00007F">Sub</SPAN> CopyAndInsert()<br>    Sheets("Sheet1").Rows(2).Copy<br>    <SPAN style="color:#00007F">With</SPAN> Sheets("Sheet2")<br>        .Rows(2).Insert<br>        .Range("A2").PasteSpecial xlPasteValues<br>    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN><br>    Application.CutCopyMode = <SPAN style="color:#00007F">False</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br></FONT>
 
Upvote 0

Forum statistics

Threads
1,223,284
Messages
6,171,182
Members
452,388
Latest member
Lorenzo_Barry

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