Inserting selected rows in another sheet

JohnGiacon

New Member
Joined
Mar 25, 2025
Messages
8
Office Version
  1. 365
Platform
  1. MacOS
Hi,

I want to transfer data from one sheet (Sheet2) to another (Sheet1)

Sheet1 has dictionary headwords, with a unique ID number .

Picture 1.png


Sheet2 has a number [perhaps zero] of rows, with headword ID.
Screenshot 2025-03-26 at 09.34.36.png

I have managed to select and copy the information in sheet2 for an ID – for 2 here.
I want to insert those rows under the row with ID 2 in sheet 1, i.e. under row 3.

The code I have for the selecting and copying the rows is not elegant, so an elegant way of doing the whole thing would be a bonus.

Sheet 1 has about 4,500 rows, sheet 2 about 20,000, so a way of looping and checking every x loops would be great.

Thanks, John
 
Hi again Peter,

Sorry for the confusion.

I need to run the sub a number of times with different information in sheet 2.

The example I sent shows 'source' information added to sheet1. I had assumed that if I then put other information in Sheet2 while having multiple instances of the one ID in Column A it would cause problems [There are 4 of ID 3276, for instance, rows 13-16]. I just tried and it doesn't cause any problems. Apologies for taking your time and not trying it earlier. I'll let you know how it goes.
Cheers John.
 
Upvote 0

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