opy Rows from Multiple Sheets to Master Sheet ('Author: JoeMo)

elsg

Active Member
Joined
Mar 16, 2013
Messages
295
Hi.
the code below was created by: JoeMo
I'm trying to adapt, but I need to say which worksheet you were to NOT be copied


Code:
Sub MergeSheets()'Author: JoeMo
'http://www.mrexcel.com/forum/excel-questions/683803-copying-data-multiple-sheets-appending-master-sheet-reverse.html
    Application.ScreenUpdating = False
    Sheets("Orçamento").Activate
    For i = Sheets.Count To 2 Step -1
        Sheets(i).Range("A2:F500").Copy
        Worksheets("Orçamento").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial (xlPasteValues)
    Next i
  
End Sub

i try
Code:
Sub MergeSheets()
Dim wsheet As Worksheet
    For Each wsheet In Worksheets
        If wsheet.Name <> "Orçamento" Or wsheet.Name <> "Fornecedor" Or wsheet.Name <> "Mão de Obra" Then
        Application.ScreenUpdating = False
         Sheets("Orçamento").Activate
         For i = Sheets.Count To 2 Step -1
        Sheets(i).Range("A2:F500").Copy
        Worksheets("Orçamento").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial (xlPasteValues)
    Next i
   Next wsheet
End Sub

Don' work

Thank for helpe me
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,215,522
Messages
6,125,312
Members
449,218
Latest member
Excel Master

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