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

  • Thread starter Thread starter Conroy
  • Start date Start date
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
 
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
 
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
 

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

Back
Top