+ Reply to Thread
Results 1 to 5 of 5

Dynamic Print Area

  1. #1
    Registered User
    Join Date
    06-10-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    3

    Dynamic Print Area

    I am trying to set the print area to print only the area of the worksheet that contains text. Some cells contain formulas, so if you print the worksheet, 3 pages will be printed while only one may actually contain information.

    I created a named range 'MyPrintArea' and entered the following formula:

    =OFFSET(Sheet1!$A$1,0,0,22+COUNTIF(Sheet1!$A$23:$A$112,">0"),12)

    This part works fine, and will return the correct range everytime as well as update as the sheet changes. The problem arises when i go to set the 'Print_Area' to equal my dynamic range 'MyPrintArea'. Instead of the named range, excel automatically updates the "refers to" area to the range that 'MyPrintArea' is equal to at that time. Ex:

    =MyPrintArea
    changes to
    =Sheet1!$A$1:$L$24

    I have tried entering the offest formula directly into 'Print_Area' and get the same result. I have seen examples where this works fine for other users, and 'Print_Area' remains equal to the named range and updates along with it.

    Any thoughts?

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Dynamic Print Area

    Did you create MyPrintArea so the scope was sheet level rather than workbook?
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    06-10-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Dynamic Print Area

    Thanks for the reply.

    Yes, I created it so it applies to the sheet. I also tried it with the scope at the workbook level, and that didn't work either.

  4. #4
    Registered User
    Join Date
    06-10-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Dynamic Print Area

    I think my issue was with the page formatting. When I switched the view from page layout to normal, the fomula started working... but now if I put it back into the page layout the formula won't work again. I guess I can live with the normal view, but if anyone has a workaround or can tell me why this happens I'd appreciate it.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Dynamic Print Area

    Can confirm changing the view to Page Layout causes the print_area name to be converted to actual cell references.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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