Avoid Excel Print blank pages

Toadstool

Well-known Member
Joined
Mar 5, 2018
Messages
2,549
Office Version
  1. 2016
Platform
  1. Windows
I'm looking for a function/formula or 1-off change solution to stop Excel printing blank pages.

I have 100 rows of data and formulae, in case there is that many data entries to make, but most of the time there will be 10 or 12 data entries which should fit one page, the other rows returning null "" from their formulae. It seems like Excel wants to print the blank pages because they have formulae, but this sheet will be used by a non-expert so I'd like to make it:
  1. Print the necessary page(s) without them having to do a Set Print area each time.
  2. Avoid VBA, Macros or Sub-Totals, rather some function or Excel setting to change once.

I've found a way to dynamically change the Print_Area by setting a Name to a calculated result (i.e. only rows with displayable data) but it will get unset if the operator ever uses Set Print area or Clear Print area, and you know they will...
Here's an example of the challenge:
2mzbghd.jpg


Any ideas?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
If you put your code for the dynamic pagenation in the workbook_beforeprint event, the user would have to change the code to avoid the print set up.
Code:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
'code to set print area here
End Sub

The code goes in the ThisWorkbook code module.
 
Last edited:
Upvote 0
JLGWhiz, Thanks but I was looking to "Avoid VBA, Macros or Sub-Totals".
 
Upvote 0

Forum statistics

Threads
1,214,973
Messages
6,122,534
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top