+ Reply to Thread
Results 1 to 3 of 3

How to prevent "printing" empty pages?

  1. #1
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    How to prevent "printing" empty pages?

    Hello

    I use this code to Print a report in sheet "C14PR" starting from E1 until last row with values and last column with data which is column O.

    Please Login or Register  to view this content.
    The problem is that in Column O-starting in O6,until O200, i have a formula that gives me "empty" cells under conditions.

    So macro, prints ALL the pages until O200, most of these emties of course!

    How can i modify the code to print only pages with data?

    Thanks in advance for any assistance on this!

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: How to prevent "printing" empty pages?

    Maria hoping that you have at least one column(i used column F(6)) in your range that has no empty cells until the last used,try this.

    Please Login or Register  to view this content.
    What actually this code does? Hides all the empties rows before print and after print, appears all rows again.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: How to prevent "printing" empty pages?

    @Fotis, I think .specialcells(xlcelltypeblanks) will not return cells which contain a formula that has a blank result, only cells containing no value/text/formula, so not sure that would work.

    You probably need to use:
    Please Login or Register  to view this content.
    instead.

  4. #4
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: How to prevent "printing" empty pages?

    Thank you Mr Foti.

    Works great as all your suggestions.

    Actually i have 2 columns with all rows filled with data. 7 &10. I choosed 7!!

    yudlugar


    Thank you for the suggestion. Can you provide the full code just for try to learn?, because as i said, Mr Fotis code, do exactly what i need.

+ 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. [SOLVED] Prevent "copy to next empty row" from copying the Web Query link
    By 4evra in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-29-2013, 09:10 AM
  2. Macro for Printing pages "X" to pages "Y"
    By sharkdive1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2012, 07:35 PM
  3. Replies: 1
    Last Post: 03-16-2011, 11:59 PM
  4. Eliminate "Blank" Pages when Printing
    By Stupidav in forum Excel General
    Replies: 7
    Last Post: 09-16-2010, 11:48 AM
  5. Excel printing "additional" blank pages?
    By marsulein in forum Excel General
    Replies: 1
    Last Post: 06-30-2006, 07:55 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