Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Page Breaks - Can they be ignored?

Helo Folk's

If I have set my pages breaks in an excel worksheet that shows for example
10 pages, can excel ignore page breaks that have no information on them.

For example, all 10 pages hold question to which users insert their
responses. If say pages 5 and 6 have been left blank, can I (when printing)
ignore these two pages so that only pages 1-4 and 7-10 print out. I must
have the page breaks including pages 5 and 6 in case they are used but I
don't want to print them if they are unanswered.

To add to this problempages 5 and 6 if not required would be hidden (by way
of a simple macro) but when I print out the worksheet, a blank page for each
of the hidden page 5 and 6 still come through.

So in short I want excel to ignore any hidden pages form the page breaks.

This question has been post before but worded completely differently so I'm
hoping I'm not confusing anyone here.

Regards,

Pat Convey.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,718
Default Page Breaks - Can they be ignored?

Excel does not ignore manual page breaks even if the row they are on is
hidden.

I'd suggest a different approach, assuming you can use macros - create a
print range that includes just the pages with data.

Here is an example where there are 4 pages with a range name Page_1, etc.,
assigned to each page. The macro counts the cells with data on each page
and only includes those where the count is greater than 0 in the print
range.

Sub PrintPagesWithData()
Dim PrnRg As Range
Dim SheetRg As Range
Dim Counter As Integer
For Counter = 1 To 4
Set SheetRg = Range("Page_" & Counter)
If Application.CountA(SheetRg) 0 Then
If PrnRg Is Nothing Then
Set PrnRg = SheetRg
Else
Set PrnRg = Union(PrnRg, SheetRg)
End If
End If
Next
If Not PrnRg Is Nothing Then PrnRg.PrintPreview
End Sub


--
Jim
"Pat Convey" wrote in message
...
| Helo Folk's
|
| If I have set my pages breaks in an excel worksheet that shows for example
| 10 pages, can excel ignore page breaks that have no information on them.
|
| For example, all 10 pages hold question to which users insert their
| responses. If say pages 5 and 6 have been left blank, can I (when
printing)
| ignore these two pages so that only pages 1-4 and 7-10 print out. I must
| have the page breaks including pages 5 and 6 in case they are used but I
| don't want to print them if they are unanswered.
|
| To add to this problempages 5 and 6 if not required would be hidden (by
way
| of a simple macro) but when I print out the worksheet, a blank page for
each
| of the hidden page 5 and 6 still come through.
|
| So in short I want excel to ignore any hidden pages form the page breaks.
|
| This question has been post before but worded completely differently so
I'm
| hoping I'm not confusing anyone here.
|
| Regards,
|
| Pat Convey.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Page Breaks - Can they be ignored?

Hello Jim,

Thanks for the reply.

I'll think I'll have a dabble at your suggestions and see what comes out.

Many thanks once again.

Pat Convey.

"Jim Rech" wrote:

Excel does not ignore manual page breaks even if the row they are on is
hidden.

I'd suggest a different approach, assuming you can use macros - create a
print range that includes just the pages with data.

Here is an example where there are 4 pages with a range name Page_1, etc.,
assigned to each page. The macro counts the cells with data on each page
and only includes those where the count is greater than 0 in the print
range.

Sub PrintPagesWithData()
Dim PrnRg As Range
Dim SheetRg As Range
Dim Counter As Integer
For Counter = 1 To 4
Set SheetRg = Range("Page_" & Counter)
If Application.CountA(SheetRg) 0 Then
If PrnRg Is Nothing Then
Set PrnRg = SheetRg
Else
Set PrnRg = Union(PrnRg, SheetRg)
End If
End If
Next
If Not PrnRg Is Nothing Then PrnRg.PrintPreview
End Sub


--
Jim
"Pat Convey" wrote in message
...
| Helo Folk's
|
| If I have set my pages breaks in an excel worksheet that shows for example
| 10 pages, can excel ignore page breaks that have no information on them.
|
| For example, all 10 pages hold question to which users insert their
| responses. If say pages 5 and 6 have been left blank, can I (when
printing)
| ignore these two pages so that only pages 1-4 and 7-10 print out. I must
| have the page breaks including pages 5 and 6 in case they are used but I
| don't want to print them if they are unanswered.
|
| To add to this problempages 5 and 6 if not required would be hidden (by
way
| of a simple macro) but when I print out the worksheet, a blank page for
each
| of the hidden page 5 and 6 still come through.
|
| So in short I want excel to ignore any hidden pages form the page breaks.
|
| This question has been post before but worded completely differently so
I'm
| hoping I'm not confusing anyone here.
|
| Regards,
|
| Pat Convey.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't move my page breaks in Page Break Preview btaft Excel Discussion (Misc queries) 6 April 27th 23 11:49 AM
Page Breaks- Printing selected rows on same page ToddEZ Excel Discussion (Misc queries) 1 July 18th 07 04:38 PM
Page Breaks Me2Ewe New Users to Excel 1 November 10th 05 06:55 PM
Page breaks patty Setting up and Configuration of Excel 1 May 25th 05 08:24 PM
How do I keep page breaks for each page in a sheet without the co. notexcellent Excel Discussion (Misc queries) 0 February 9th 05 07:53 PM


All times are GMT +1. The time now is 07:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"