How can I print a worksheet excluding blank rows?

L

lohme

I want to print a worksheet where their are blank rows for future use between
the main body of the data and the total row. I want to exclude the blank
rows. How can I do this?
 
L

lohme

I want to automate the printing and I won't know how many blank rows I'm
going to end up with each time.
 
P

Pete_UK

You can apply a filter on a column which includes a total (or some text
like "Totals:"), selecting non-blanks. If by "automate the printing"
you mean use a macro, then you can incorporate the necessary code to
filter out the blanks before printing and to reset them afterwards.

Hope this helps.

Pete
 
D

Don Guillett

to hide rows with blanks in col A

Sub hideem()
Columns(1).SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True
End Sub
 
L

lohme

Thanks, Don, I'll give this a try.

Don Guillett said:
to hide rows with blanks in col A

Sub hideem()
Columns(1).SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True
End Sub
 
L

lohme

Thanks. I'll give this a try.

Pete_UK said:
You can apply a filter on a column which includes a total (or some text
like "Totals:"), selecting non-blanks. If by "automate the printing"
you mean use a macro, then you can incorporate the necessary code to
filter out the blanks before printing and to reset them afterwards.

Hope this helps.

Pete
 
L

lohme

That worked like a treat!!! Thanks so much.

Don Guillett said:
to hide rows with blanks in col A

Sub hideem()
Columns(1).SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True
End Sub
 
P

Pete_UK

I would suggest this (based on Don's hideem):

Sub show_em()
Columns(1).SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = False
End Sub

Hope this helps.

Pete
 
L

lohme

Thanks - you and Don were a huge help!

Pete_UK said:
I would suggest this (based on Don's hideem):

Sub show_em()
Columns(1).SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = False
End Sub

Hope this helps.

Pete
 
Top