page break

  • Thread starter Thread starter mike
  • Start date Start date
M

mike

Is it possible for a macro to find a word in the cell and
use it as it end point for page break? I will like to
have a page break on every cell that have the
word "Sales grand total". Thanks in advance
 
Turn on the macro recorder

do edit=>find
type in
Sales grand total

when it is found, do Insert=>PageBreak

Turn off the macro recorder. Adapt the recorded code to your needs.

Note that if the cells are farther apart than what can fit on a page, that
you may not get the results you expect. This only works if the distance can
be contained on an entire page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top