ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Can I suppress printing a line if a value = 0? (https://www.excelbanter.com/excel-discussion-misc-queries/218595-can-i-suppress-printing-line-if-value-%3D-0-a.html)

conroy

Can I suppress printing a line if a value = 0?
 
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

Pete_UK

Can I suppress printing a line if a value = 0?
 
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

On Jan 31, 11:57*am, Conroy wrote:
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



Daniel.C[_3_]

Can I suppress printing a line if a value = 0?
 
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

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




Gary''s Student

Can I suppress printing a line if a value = 0?
 
I would use AutoFilter to "hide" rows with no information prior to printing
--
Gary''s Student - gsnu200830


"Conroy" wrote:

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



All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com