Copying & Pasting Rows

help-me

New Member
Joined
Feb 2, 2005
Messages
5
Hello, I'm a bit of newbie to Excel/VBA and I'm a bit stuck.

I'm attempting to copy a range (which may be different) from Worksheet A and paste it to a worksheet B.

The problem is my macro keeps overwriting data on Worksheet B.

e.g I highlight 10 rows and use the macro to paste them from Sheet A to Sheet B.

I then attempt to paste a further 12 rows into Worksheet B, however it's overwriting the rows that were previously pasted. Is their anyway Excel can figure out, how to resolve this.

it's driving me crazy.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Can you post the code you already have?

Also, where do you want to paste the data into worksheet B?
 
Upvote 0
Here you go... The cell ref B7 - refers to the top of the sheet, underneath the column headers & yesI would like to paste into Sheet B. Thanks for your help.


Dim MyRange As Range

'Select Sheet and Prepare Range

Sheets("Assembly").Select



'Copy Range

Selection.Copy

'Select Sheet & Paste Selection
Sheets("Notification").Select
Range("B7").Select
'Selection.EntireRow.Insert
ActiveCell.PasteSpecial
'Code to add additional row for further adding.
Range("B7").Select
Selection.EntireRow.Insert
Range("B7:L7").Select
Selection.Interior.ColorIndex = xlNone

'Need another row empty.
Range("B7").Select
Selection.EntireRow.Insert
Range("B7:L7").Select
Selection.Interior.ColorIndex = xlNone

'Need another row empty.
Range("B7").Select
Selection.EntireRow.Insert
Range("B7:L7").Select
Selection.Interior.ColorIndex = xlNone

'Need another row empty.
Range("B7").Select
Selection.EntireRow.Insert
Range("B7:L7").Select
Selection.Interior.ColorIndex = xlNone


If MsgBox("Are you ready to Review Your?", vbYesNo, "Ready to Transfer?") = vbYes Then
frmPrepare.Show
End If


End Sub

Fingers crossed, your be able to help...
 
Upvote 0
As far as I can see the posted code doesn't do any copying/pasting between sheets.

EDIT Sorry I'm wrong, but I'm still unsure what you want to do.

Can you explain in words exactly what you are trying to achieve?

Which sheet are you copying from/to?

What do you want to copy/paste?
 
Upvote 0
Basically I would like to paste sections of information from Sheet A to Sheet B. On each paste, I would like the information on Sheet B to shuffle down the worksheet, so that room can be made to paste the new information from Sheet A.

Hope this makes more sense.
 
Upvote 0

Forum statistics

Threads
1,203,225
Messages
6,054,244
Members
444,713
Latest member
SAK

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