Loop through range, copy paste to new workbook

Hoppbananen

New Member
Joined
May 4, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hey!

So I have this problem...

I have a table of data that I need to loop through and look for two different values in column A (Range A:H). For example, if value in cell A2 is 1 (can be 1 or 2) I need to copy all values in A2:H2 to a new workbook and also adding a value in cell I1 of the new workbook.

Depending on the value in column A of the original workbook, I need to paste the same range four or six times with four or six different values in cell I1 of the new workbook, then go on to next row of the original workbook.

Does this make sense? Really hoping for some help!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Many people viewed but people just don't like guessing. Perhaps copy paste (use XL2BB preferred) actual sample and some explanation will get more people to start looking more into it. ;)
 
Upvote 0

Forum statistics

Threads
1,214,945
Messages
6,122,397
Members
449,081
Latest member
JAMES KECULAH

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