Excel equivalent of 'Keep lines together'

F

Fred Smith

I've subtotaled a table, and need to print it out. I would like all rows
which form part of the subtotal to print together on one page. If there's
not enough room on the page, I'd like a page break after the previous
subtotal.

In Word, I can use 'Keep lines together'. Is there an equivalent in Excel?

If not, how would I program this? Is it possible to tell in VBA where the
page beak is? And, if I don't like where it is, can I move it to a different
row?
 
F

Fred Smith

The problem is that won't do what I want. 'Page break between each group'
will insert a page break regardless of the size of the group. Most of my
groups are 4 or 5 rows long. I don't want that many pages. I want a page
break only if there is not enough room left on the page for the group.

Any other suggestions?
 
Top