To go into Print Titles and say that “Rows to repeat at top” is 1:1. I'm going to come here to page layout, I'm gonna declare that these sevenĬolumns are going to be my print area- Print Area, Set Print Area. Really screw things up if you make any of these changes after the fact.Īlright, so for me, what I'm going to do is The most important part here is to figure out how many rows because you'll Now, Gwen hasįigured out that she can fit about 60 rows. Page, these 60 cells and then next to it, the next 60 cells. To solve this back then, but this twins problem is more complicated.Īround 15,000 rows. This is from years ago, and I actually used a formula Gwen is watching video 984, which wasĬalled Sneaking Columns. Hey, welcome back to MrExcel netcast, I'm Bill Make sure that the last name on page 1 column E is correctly followed by the first name in page 1 column I. Click the F5 key or click the Run icon as shown below. In the figure below, the cursor is right after Sub WrapThem(). In the VBA window, click anywhere inside the macro. Change 9 to 12 because the second output column is L instead of I.Ĭells(NextRow, NextCol).Resize(RowsPerPage, 4).Value = _ Change 5 to 7 in two places because the first output column is G instead of E. In the following text, change 3 to 4 in two places because you have 4 columns instead of 3. Put the first set of columns in G:J and L:O. My output columns appear in column E (5th column) and column I (9th column). If you have 3 lines of headings, your data would start in A4. In this example, the data starts in A2 (right after headings in row 1). Change NextCol = 5 to NextCol = 7 (because column G is the 7th column). If you have five lines of titles and your new data is going to start in G6, you would change NextRow = 2 to NextRow = 6. In this example, the first place for the new data will be cell E2. If your data started in column C instead of column A, you would change this:įinalRow = Cells(Rows.Count, 3).End(xlUp).Row The FinalRow = line looks for the last entry in column 1. Here are a few other things you might have to change depending on your data: ' the following line says XLUP not x1up !įinalRow = Cells(Rows.Count, 1).End(xlUp).RowĬells(NextRow, NextCol).Resize(RowsPerPage, 3).Value = _įind the line that says RowsPerPage = 46 and replace the 46 with the number of rows that you found in your Print Preview.
#How to paginate in excel 2010 code#
For example: MyWorkbookTestCopy.xlsxĬopy the following code and paste to the code window Save your workbook as a new name in case something goes wrong. This will be an important number going forward. In the Print Preview, find the last row number on page 1. If necessary, click the Show Print Preview tile in the middle of the screen. Once all of your page settings are correct, use Ctrl + P to display the Print Preview document. Specify any headers and footers that will appear on each page.Ĭopy the headings from A1:C1 over to E1:G1.Ĭopy the headings from A1:C1 over to I1:K1.įill the numbers 1 to 100 in E2:E101 with =ROW()-1 If you want your headings from Row 1 to repeat on each page, use Page Layout, Rows to Repeat at Top, and specify 1:1 Set the margins on the Page Layout tab of the Ribbon Before you start with the macro, you need to do all of these things: The first step is to figure out how many rows fit on your printed page. Back then, I answered the question using formulas. Fig in H1, then Guava starting in C2 and so on. In the case, the data was arranged horizontally, with Apple in C1, Banana in D1, Cherry in E1.
#How to paginate in excel 2010 how to#
Almost 10 years ago, I answered a question on how to snake 1 column in to 6 columns.