Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dave
 
Posts: n/a
Default macro to not print blank value rows in invoice

I have an invoice in Excel for billing my customers with over 100 total items
that I carry in my full inventory
I might only use 25 or so per invoice.
Currently eliminate the blank rows manually so I don't have to print all items
would like a macro to automatically not print any row(item) that has no value
Any help would be appreciated.
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

This example test if the whole row is empty.
It test row 1 -20 on the active sheet

Sub test()
Dim a As Long
For a = 1 To 20
If Application.WorksheetFunction.CountA(Rows(a)) = 0 Then _
Rows(a).Hidden = True
Next a
ActiveSheet.PrintPreview
Range("A1:A20").EntireRow.Hidden = False
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dave" wrote in message ...
I have an invoice in Excel for billing my customers with over 100 total items
that I carry in my full inventory
I might only use 25 or so per invoice.
Currently eliminate the blank rows manually so I don't have to print all items
would like a macro to automatically not print any row(item) that has no value
Any help would be appreciated.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
make first few rows print on every page? CD New Users to Excel 3 January 3rd 05 06:07 AM
Blank rows Mark Excel Discussion (Misc queries) 2 December 26th 04 10:10 PM
Adding Rows to Master Sheet Excel Newbie New Users to Excel 1 December 23rd 04 10:56 PM
Macro for changing print settings Bill Excel Discussion (Misc queries) 3 December 3rd 04 10:49 PM
Macro for sorting different rows ciscopena Excel Worksheet Functions 0 November 1st 04 11:04 PM


All times are GMT +1. The time now is 11:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"