Consolidate multiples rows in one sheet

Goalexcel

Board Regular
Joined
Dec 28, 2020
Messages
101
Office Version
  1. 2016
Platform
  1. Windows
Hello Expert Team
Please kindly give me some help, multiples sheets need to copy in one sheet name Report. I am using below code but it's not copy. My excel file contained sheet 1 until sheet 8, column A and Column B rows always change the data.

Sub Consolidate()

Dim i As Integer

For i = 1 to Worksheets.Count = 1

Worksheets(1).Select
Range("A1").Select
Range(Selection, Selection.End(x1Down)).Select
Range(Selection, Selection.End(x1TopRight)).Select
Selection.Copy

Worksheets("Report").Select
Range("A1048576").Select
Selection.End(x1Up).Select
ActiveCell.Offset(1,0).Select
ActiveSheet.Paste

Next i

End sub

Please check below attach, sheet start 1 until sheet 8, usually will be change the number of sheets.

1636076969971.png


See sheet report

1636077061503.png
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
MAybe this way
VBA Code:
Sub MM1()
Dim i As Integer, n As Integer
n = 1
For i = 1 To 8
    With Sheets("Sheet" & i)
        .Range("A:B").Copy
        Sheets("Report").Cells(1, n).Insert
    End With
n = n + 2
Next i
End Sub
 
Upvote 0
Solution
MAybe this way
VBA Code:
Sub MM1()
Dim i As Integer, n As Integer
n = 1
For i = 1 To 8
    With Sheets("Sheet" & i)
        .Range("A:B").Copy
        Sheets("Report").Cells(1, n).Insert
    End With
n = n + 2
Next i
End Sub
Thank you so much Mr. Michael for your excellent and fastest assistance. All the best wishes for the Expert Professional Comunity.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,865
Members
449,052
Latest member
Fuddy_Duddy

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