VBA Paste

ent1701e

New Member
Joined
Mar 5, 2002
Messages
2
Hi,
I'm writing a macro that pastes a row of data from one sheet to another. FYI, the original row of data is in a list.
What happens is that when I paste the row onto another worksheet, Excel merges the row below with my selected row. I don't want it to do that. If I do it manually, it works fine... If I do it with a macro, it merges then pastes it in.
Thanks in advance.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Try the following code:

Worksheets(2).Rows("1:1").Value = Worksheets(1).Rows("1:1").Value

It sets Row 1 of Worksheet 2 equal to Row 1 of Worksheet 1. If you give me more details of exactly what you want to do, then I customize the macro for you.
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,211
Members
448,554
Latest member
Gleisner2

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