You are here:

Excel/Copy Last row of each sheet to 1 sheet.


Hi Dave,

My destination sheet is called Master Data.

I would like to Copy and paste the last row of each sheet and paste into Master Data first empty row.


Hi Paul,

Give this a go.

Sub LoopThroughSheets()

  Dim shts As Worksheet
  Dim Ws As Worksheet

  Set Ws = Worksheets("Master Data")

  For Each shts In Sheets

      If shts.Name <> Ws.Name Then

        With shts

        .Cells(Rows.Count, "A").End(xlUp).EntireRow.Copy _
        Ws.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)

        End With

      End If

  Next shts

End Sub

About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Dave Morrison


I can answer most excel questions My Website is


I have been working with spreadsheets since 1991. I am a self-trained excel developer since 2005.

My website

Business admin. U of R.

Awards and Honors
Microsoft Excel MVP 2011-2012

©2017 All rights reserved.