

Set rangeSelection = Application.SelectionĪctiveSheet.Rows(cellCurrent.Row + 1).PageBreak = _ If (cellCurrent.Value cellCurrent.Offset(-1, 0).Value) ThenĪctiveSheet.Rows(cellCurrent.Row).PageBreak = _
#Excel 2016 remove page break lines how to
If you are novice in VBA, feel free to read How to insert and run VBA code in Excel 2010, 2013 - tutorial for beginners. InsertPageBreaksByKeyphrase - adds a page break each time it finds a cell that contains "CELL VALUE" (it's the entire cell, not part of it, don't forged to replace "CELL VALUE" in macro with your actual key phrase).InsertPageBreaksIfValueChanged - inserts page breaks if the value in the column changes.Just select the range of cells you want to use for splitting and avoid the headers. They will remove all default page breaks in your table and will easily add new marking lines at the appropriate locations. Use macros to add the marking linesīelow you can find two really useful macros. Say you have column named Category and you want each category to be printed on a new page.īelow, you'll find several helpful macros and the steps how to add page breaks using the Excel built-in Subtotal functionality. If you often print your data tables, you may want to learn how to automatically insert page breaks in Excel by condition, for example when a value in certain column changes. Insert a page break in Excel by condition Therefore, if you go to Print Preview, you'll see different parts of data on separate sheets. On the picture below, you can see 3 horizontal page breaks added.
#Excel 2016 remove page break lines manual
If manual page breaks that you add don't work, you may have the Fit To scaling option selected (Page Layout tab -> Page Setup group -> click Dialog Box Launcher Button image -> Page).



The Excel page break option helps you see where page breaks will appear when your worksheet is printed.
