only printing certain rows

S

StephB

I have a long list of data. Not every column has data in it. I only want to
print the rows with data in a certain column. Is there a format or formula to
automatically hide the rows if there is nothing entered in the cell in a
certain column? The data is long and I have to do this for multiple sheets so
I'd prefer something automatic.

Thanks in advance.
 
R

Ron de Bruin

You can try this
http://www.rondebruin.nl/print.htm#Hide

And use this lines in the event

With ActiveSheet
On Error Resume Next
.Columns("A").SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True
.PrintOut
.Columns("A").SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = False
On Error GoTo 0
End With
 
E

Elkar

The easy way to do this would be to apply an AutoFilter to that column, then
select "Non Blanks".

Highlight the column
Select Filter from the Data menu
Select AutoFilter
You should now see a dropdown box in the first cell of that column
From that list, select (NonBlanks)

You can then turn this on/off as needed without writing code or macros or
long formulas.

HTH,
Elkar
 
Top