Copy specific row from series of sheets to sheet 1 in the workbook

Ed Judge

New Member
Joined
Apr 20, 2012
Messages
5
Haven't done any VBA in a long time so I'm very rusty. I need to copy cells A2 - G2 from sheets 2 - 30 in a workbook to create rows Sheet 1, which will start out blank.

Any assistance pointing me in the right direction is greatly appreciated. This is the final part of longer process. Sheet 1 is used as a summary page.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi,

Something like this?

Code:
Sub a()
Dim iSheets As Integer, iRow As Integer

For iSheets = 2 To 30
With Sheets(1)
iRow = .Range("A" & .Rows.Count).End(xlUp).Row + 1
.Range("A" & iRow & ":G" & iRow).Value = Sheets(iSheets).Range("A2:G2").Value
End With

Next iSheets

End Sub
 
Upvote 0
Thanks for that quick reply, davesweep. I love it when something works the very first time. I knew I came to the right place.
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

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