Need macro to copy and paste to other location within a row

condo0000

New Member
Joined
Sep 4, 2002
Messages
3
Hello,

I am looking for a macro that will allow me to copy and paste the contents of a couple of cells in one row into another row. Here is what I need to do....
I want to take the data in positions B3 to I3 and paste it into cells B408 to I408. I then want to take the data in J3 to Q3 and put it in A409 to H409. This process will continue taking 8 cells from a row and pasting them in the next consecutive row.
If this is unclear feel free to e-mail me at cclewell@fciconnect.com for clarification. Thanks a Heck of a lot for your help,
Craig
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

gnaga

Well-known Member
Joined
Jul 9, 2002
Messages
680
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
Copy from A3:H3 ans paste to A408:H408
Copy from I3:P3 ans paste to A409:H409
Copy from Q3:X3 ans paste to A410:H410

Is it like uniformly copy and paste the no.of cells and paste it to another row?

Then try this code

Sub Data_Copy()
Dim I, J, K As Integer

ActiveWorkbook.Sheets(4).Activate
For I = 1 To 10
For J = 1 To 256
Range(Cells(I, J), Cells(I, J + 7)).Copy
Range("A" & K + 408).PasteSpecial
J = J + 7
K = K + 1
Next J
Next I
Application.CutCopyMode = False
End Sub

This code will copy data from every eight cells of first 10 row and then paste starting from row 408

You may have to modify the code to suit your requirement


GNaga
This message was edited by gnaga on 2002-09-06 07:44
 

Watch MrExcel Video

Forum statistics

Threads
1,130,309
Messages
5,641,448
Members
417,209
Latest member
Agbarker

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