+ Reply to Thread
Results 1 to 3 of 3

Printing ONLY worksheets with data

  1. #1
    Registered User
    Join Date
    05-22-2015
    Location
    Louisville, KY
    MS-Off Ver
    Office 2010
    Posts
    14

    Printing ONLY worksheets with data

    I have a multiple page workbook. To save paper and toner, I want the ability to print only those worksheets that contain data (data is based on, and filled in from, a master sheet at the front of the workbook). I tried to use this macro:

    End If
    Dim wks As Worksheet
    For Each wks In ActiveWorkbook.Worksheets
    If Not IsEmpty(wks.Range("A4")) Then
    wks.PrintOut
    End If
    Next
    Set wks = Nothing
    End Sub

    That macro works the way it's supposed to but the problem is this: I’m using A4 in each sheet as the reference point for whether the sheet prints or not. Because I have a formula in A4, the macro is reading it as "something in A4". I really need to print the sheet if there is a RESULT in A4, not just a formula. Is there a way? Also, I want to be able to automatically print the Master page (which does NOT have anything in A4, btw...)

  2. #2
    Forum Contributor
    Join Date
    09-25-2009
    Location
    Indiana
    MS-Off Ver
    Excel 2003
    Posts
    152

    Re: Printing ONLY worksheets with data

    Try this

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-22-2015
    Location
    Louisville, KY
    MS-Off Ver
    Office 2010
    Posts
    14

    Re: Printing ONLY worksheets with data

    YES! That solved my problem. Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 06-11-2014, 09:23 AM
  2. Replies: 0
    Last Post: 07-18-2012, 03:57 AM
  3. Printing ranges within worksheets depending on amount of data entered / with row gaps
    By antonywalsh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-24-2012, 08:35 PM
  4. printing worksheets
    By Graham7979 in forum Excel General
    Replies: 1
    Last Post: 05-29-2006, 04:15 PM
  5. Printing a range of data from worksheets
    By stge in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-27-2005, 03:02 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1