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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Eric B

Board Regular
Joined
Jun 16, 2002
Messages
108
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
 

Eric B

Board Regular
Joined
Jun 16, 2002
Messages
108
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
 

philipjsmith

New Member
Joined
May 19, 2002
Messages
20
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.
 

Forum statistics

Threads
1,144,767
Messages
5,726,177
Members
422,660
Latest member
mrsteele

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
Top