MOVE DATA

Moeses

New Member
Joined
Mar 21, 2019
Messages
7
Hi,

I am trying to move an entire row from sheet A (Form) to sheet B (Master)
But for some reason, I am getting error # 1004 on line 2 below.
Please help? thank you


Sub Move_data()

Rows.Range("B3:R3").Copy
Worksheets("Master").Range("A3:Q3").End(xlDown).Offset(1, 0).EntireRow.Insert
Worksheets("Form").Activate
Worksheets("Form").Range("B3:R3").ClearContents
Worksheets("Form").Cells(3, 1).Select
Application.CutCopyMode = False

End Sub
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
What is the exact error message?
 
Upvote 0
What is the exact error message?
the message is:

1615845760380.png
 
Upvote 0
Do you have anything in col A below A3?
 
Upvote 0
... so the goal is to move the entire row from the first sheet labeled FORM to the second
sheet labeled MASTER.
 
Upvote 0
The entire row, or just columns B:R?
 
Upvote 0
When I click on "post data" the content of B3:R3 are to be moved to sheet2 starting at A2:Q2.

1615847034359.png

1615847168542.png
 
Upvote 0
Ok, how about
VBA Code:
With Sheets("Form")
   .Range("B3:R3").Copy
   Worksheets("Master").Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial
   .Range("B3:R3").ClearContents
End With
Application.CutCopyMode = False
 
Upvote 0

Forum statistics

Threads
1,214,989
Messages
6,122,622
Members
449,093
Latest member
catterz66

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