Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
kwrohde
 
Posts: n/a
Default Formula to govern Print Area


I want to set my print area based on a formula. For example

if the value in cell I1 = 1

then print range A1:G23

otherwise print range H24:M44



I have found that you can type a statement like this:

=if(I1=1,A1:G23,H24:M44)

into the print area box on the page setup tab and if I1=1 then excel
will replace =if(I1=1,A1:G23,H24:M44) with A1:G23

therefore printing what I wanted but lossing the formula.

Any ideas?


--
kwrohde
------------------------------------------------------------------------
kwrohde's Profile: http://www.excelforum.com/member.php...fo&userid=5721
View this thread: http://www.excelforum.com/showthread...hreadid=535671

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Formula to govern Print Area

Try this.

Insert|Name|Define
In the names in workbook box:
'sheet1'!Print_Area

in the refers to box:
=INDIRECT(IF('Sheet1'!$I$1=1,"$A$1:$G$23","$H$24:$ M$44"))

Change the worksheet name accordingly.




kwrohde wrote:

I want to set my print area based on a formula. For example

if the value in cell I1 = 1

then print range A1:G23

otherwise print range H24:M44

I have found that you can type a statement like this:

=if(I1=1,A1:G23,H24:M44)

into the print area box on the page setup tab and if I1=1 then excel
will replace =if(I1=1,A1:G23,H24:M44) with A1:G23

therefore printing what I wanted but lossing the formula.

Any ideas?

--
kwrohde
------------------------------------------------------------------------
kwrohde's Profile: http://www.excelforum.com/member.php...fo&userid=5721
View this thread: http://www.excelforum.com/showthread...hreadid=535671


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
kwrohde
 
Posts: n/a
Default Formula to govern Print Area


Im not sure what you mean when you say "in the refers to box:". If you
mean the print area box on the sheet tab of page setup from the file
menu then your formula:

"=INDIRECT(IF('Sheet1'!$I$1=1,"$A$1:$G$23","$H$24: $ M$44"))"

works similar to my formula:

"=if(I1=1,A1:G23,H24:M44)".

Lets say that cell A1 = 1.
If you enter my formula or your formula into the Print area box, click
ok, close the page setup window, and reopen the page setup window the
Print are box will read A1:G23. Which is the area I wanted to print.
The problem arrises when say cell A1 changes from 1 to some other
value. The print area will not change because the formula is no longer
there. any ideas.


--
kwrohde
------------------------------------------------------------------------
kwrohde's Profile: http://www.excelforum.com/member.php...fo&userid=5721
View this thread: http://www.excelforum.com/showthread...hreadid=535671

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
print area selection slows excel, formula for hiding rows?? sbrimley Excel Discussion (Misc queries) 1 March 21st 06 11:26 PM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Can't Clear Print Area GeorgeF Excel Discussion (Misc queries) 2 August 5th 05 06:10 PM
Changing print area Aaron Excel Discussion (Misc queries) 2 January 9th 05 05:58 PM


All times are GMT +1. The time now is 03:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"