+ Reply to Thread
Results 1 to 2 of 2

Set print area

Hybrid View

  1. #1
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Set print area

    Hi,
    I set a UDN a1a=l!$A$1:index(l!$A$1:$N$28,l!$J$1,l!$K$1)
    I put that name in Set Print Area. It works, but then I changed dimentions (J1 & K1) nothing happened. I looked in Page setup, there was A1:G7 (old area) in Set Print Area inputbox. I understand that i can do it with VBA, but UDN is great feature, why not in this case?
    OFFSET works the same way.
    I'm not the first to raise it
    http://excel-tips.blogspot.ru/2008/1...-in-excel.html.
    and here
    http://www.excelforum.com/excel-gene...rint-area.html
    is there any desision without VBA?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Set print area

    Hi tim201110,

    I found what looks like a solution (tested in Excel 2003 only) in using the OFFSET formula and an intermediate named range: http://excel-tips.blogspot.com/2008/...-in-excel.html
    See the attached copy of your sample file.

    If the intermediate named range is not used, the Print Area seems to reset itself to absolute values.

    Formula: copy to clipboard

    MyPrintArea:
    =OFFSET(l!$A$1,0,0,COUNTA(l!$A:$A),COUNTA(l!$1:$1))

    Print_Area:
    =MyPrintArea


    This has the limitation that there can't be any empty cells in Column 'A' or in Row '1'. If you have other rows/columns with non-blank cells instead of ('A' / '1'), replace the items in red.

    Lewis
    Attached Files Attached Files

+ 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. Set print area of selected range then print preview if ok then print the document!
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2014, 07:10 AM
  2. Macro - Set Print Area for Changing Data Area
    By ksp in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-27-2013, 04:19 AM
  3. Replies: 1
    Last Post: 02-12-2013, 12:16 PM
  4. VBA to set print range, open box asking for print qty, print, then redefine print area
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2012, 06:43 PM
  5. Replies: 8
    Last Post: 05-23-2007, 06:39 AM
  6. [SOLVED] How do you turn off a print area for a page? (no print area)
    By Grunen in forum Excel General
    Replies: 4
    Last Post: 10-08-2005, 03:05 PM
  7. Print Area:What would be the code for setting the print area
    By wammer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2005, 02:05 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