Excel Macros

  minty1 14:42 09 Jul 2005

I want to create a print macro so that blank rows on a spreadsheet do not print.

Anyone have any ideas?

  pauldonovan 15:00 09 Jul 2005

but you'll need to help Excel I think to figure out which rows are blank.

presumably you want the entire sheet to have NO blank rows in - not even to separate titles and a table or anything?

Is the spreadsheet a single table or lots of distinct data spread out? If a single table you could (with or without a macro) do an autofilter and filter out blanks based on a particular column then print. This could be enabled, print then disabled in a macro.

If it is lots of spread out data the macro would need to analyse each row and either check say the first cell is empty or if you have lines that have something on them but the first cell is empty that wouldn't work! Excel has trouble knowing what is empty and what isn't and you will have to define that somehow.

Let me know your thoughts on this and I can help further.

  VoG II 15:10 09 Jul 2005

There is no need for a macro.

Install ASAP Utilities from click here

Select all your data then in ASAP Utilities menu Columns/Rows | Conditional Column and row select, hide or delete. In Search Options select Completely empty rows. Tick Hide, click Start.

Then print.

  VoG II 15:17 09 Jul 2005

Or if you really want a macro here's a snippet

Range("A1:A" & Range("A65536").End(xlUp).Row).SpecialCells(xlCellTypeBlanks).Rows.EntireRow.Hidden = True


  minty1 15:19 09 Jul 2005

A big thanks to you all


  pauldonovan 17:12 09 Jul 2005

Didn't know about ASAP - i'll try that.
Or the code for blank cells !

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

iPhone X review

How to find a font: Discover the name of a typeface with these apps

The best iPhone for 2017

Les meilleurs logiciels de montage vidéo gratuits (en 2017)