Copy records with range

MC09

New Member
Joined
Jun 11, 2008
Messages
6
I need to copy records in a worksheet. First I need to look for value1 and move 2 rows after it. Then I will look for value2 and that's where I will stop my copying. And then I will look again for value1 and so on.

For example

Value1 = A4
Value2 = A8
Range to copy = A6:A8

Value1 = A14
Value2 = A19
Range to copy = A16:A19

Thanks in advance for any help. In addition, the lookup reference is column A only.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
Hi

Do you have duplicated values in column A? So if you have Value1 you are looking for, it may occur in row 10, row 100, row 1000 and row 2000? Then you would want to search for 4 instances of Value2 as well? Or is it simpler than this - there will only be one unique instance of each value?
 
Upvote 0

MC09

New Member
Joined
Jun 11, 2008
Messages
6
Hi

Do you have duplicated values in column A? So if you have Value1 you are looking for, it may occur in row 10, row 100, row 1000 and row 2000? Then you would want to search for 4 instances of Value2 as well? Or is it simpler than this - there will only be one unique instance of each value?

yup, value 1 and value2 are duplicates. Value1 may occur in row 10, row 100, row 1000 and row 2000. Then value2 may occur in row 20, row 150, row 1200 and row 3000. Thanks.
 
Upvote 0

Forum statistics

Threads
1,190,782
Messages
5,982,878
Members
439,803
Latest member
sushilneupane

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
Top