Excel Guides

Repeating Rows at the Bottom of a Page in Excel

If you have a large worksheet in Microsoft Excel, you might find it useful to have the data from the last row of the sheet appear at the bottom of each subsequent page. This way, you can keep track of what information is being displayed on each page. To do this, you'll need to use a macro.

First, open your Excel workbook and select the worksheet that you want to modify. Then, click on the "View" tab and select "Macros".

In the macro window, type in the following code:

Sub Print_Last_Row()

  Dim LastRow As Long

  LastRow = Cells(Rows.Count, 1).End(xlUp).Row

  For i = 1 To LastRow

    If i Mod 56 = 0 Then

      Rows(i).Select

      Selection.Copy

      Rows(i + 1).Select

      ActiveSheet.Paste

    End If

  Next i

End Sub

This code will loop through all of the rows in your selected worksheet and copy the data from the last row to every 56th row. So, if your worksheet has 100 rows of data, the macro will copy the data from row 100 and paste it into rows 56, 112, 168, 224, and so on.

Once you've entered the code, click on "Run" to run the macro. Then, save your workbook and print it out.

Move beyond 

Excel

Get started with Causal today.
Build models effortlessly, connect them directly to your data, and share them with interactive dashboards and beautiful visuals.