NOT PRINTING CONSECUTIVE BLANK ROWS

philipjsmith

New Member
Joined
May 19, 2002
Messages
20
I have a worksheet that includes some empty rows which are located at random intervals throughout the page. I would like the Print command to ignore all consecutive rows of 2 or more, i.e. NOT to print two or more blank rows. Is there a way of incorporating a suitable macro in the general Print command that will do this, or if not can a separate macro be made to make an allowance for this before the Print command is clicked?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Filter-based answer. Sorry I don't have a macro that could help. Until someone does, maybe this will help. Make a new column adjacent to the print range and enter the following in the second row and copy down as needed:
=ISBLANK(A1)+ISBLANK(A2)
Then turn on the autofilter
Data|Filter|Autofilter
From the drop down menu on the new column, pick Custom|does not equal| and enter the value "2".
This should kill the second of the double blank rows. Again, sorry if that was too basic for what you were after.

HTH
-Eric
 
Upvote 0
Filter-based answer. Sorry I don't have a macro that could help. Until someone does, maybe this will help. Make a new column adjacent to the print range and enter the following in the second row and copy down
=ISBLANK(A1)+ISBLANK(A2)
Then go to Data|Filter|Autofilter
From the drop down menu on the new column, pick Custom|does not equal| and enter the value "2".
This should kill the second of the double blank rows. Again, sorry if that was too basic for what you were after.

HTH
-Eric
 
Upvote 0
Thanks but how do you prevent the new column from being printed out?
Do you have to re-set the print area?
If so, this would defeat the object of the exercise.
Thanks again.
 
Upvote 0

Forum statistics

Threads
1,213,558
Messages
6,114,296
Members
448,564
Latest member
ED38

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