Results 1 to 4 of 4

Thread: Excel: Selecting discontiguous rows for PrintArea causes few rows printed per page

  1. #1

    Thread Starter
    Addicted Member Isorfir's Avatar
    Join Date
    Feb 2006
    Location
    In Debug Mode
    Posts
    133

    Excel: Selecting discontiguous rows for PrintArea causes few rows printed per page

    Okay, I don't know if the title made any sense, but here's what I'm doing.

    Say I have the following ranges selected as my print area: A1:F4, A10:F13, A20:F21

    When I print, it prints each area to its own page, is there any way I can have it fill up a single page (until there isn't room left) with my print areas?

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Excel: Selecting discontiguous rows for PrintArea causes few rows printed per pag

    2 possible ways come to mind
    set a contiguous print area, but hide the rows between the ranges you want to print

    or copy all the required ranges to a temporary worksheet, so again it would print a contiguous range
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    Addicted Member Isorfir's Avatar
    Join Date
    Feb 2006
    Location
    In Debug Mode
    Posts
    133

    Re: Excel: Selecting discontiguous rows for PrintArea causes few rows printed per pag

    Thanks for replying westconn1.

    In my example, I set a print area range of A1:F450. I then hide most of the rows in between, but leave say 10% not hidden. When I print, I get the 1st and 4th page with rows, and 2,3,5,6 are completely blank. It's as if it's printing the entire area, but hiding the rows, thus creating blank pages.

    If, alternatively, I only select what’s left as my print area(s), I get my first problem described: 6 pages with an average of 2 or 3 rows on each.

    Maybe there's a better way to go about this?
    IDE: Visual Studio 2008/2010 - C# | VB.Net

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Excel: Selecting discontiguous rows for PrintArea causes few rows printed per pag

    Maybe there's a better way to go about this?
    try the temp worksheet
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width