Can I suppress printing a line if a value = 0?

C

Conroy

I am printing a chart of accounts but would like to suppress the lines for
which there a no values, so that the report won't have all these zero
balances showing
 
P

Pete_UK

Apply Autofilter to that column and choose Custom | Not equal to | 0
(zero).

It will hide the rows that contain 0 in that column, and then you can
print out. Select All from the filter pull-down after printing.

Hope this helps.

Pete
 
D

Daniel.C

Try the following macro (the zero values being in column A) :

Sub printWithoutZeroes()
Dim c As Range
For Each c In Range([A1], [A65000].End(xlUp))
If c = 0 Then c.EntireRow.Hidden = True
Next c
ActiveSheet.PrintPreview
Range([A1], [A65000].End(xlUp)).EntireRow.Hidden = False
End Sub

HTH
Daniel
 
G

Gary''s Student

I would use AutoFilter to "hide" rows with no information prior to printing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top