#1   Report Post  
Old July 22nd 14, 07:25 PM
Junior Member
 
First recorded activity by ExcelBanter: Jul 2014
Posts: 2
Default Print Area

Hello guys!
Can I have your help; I have an range with data A1:T20. Can you define it as print area if it contains any letters or numbers in cell G10? Thanks!

  #2   Report Post  
Old July 22nd 14, 08:03 PM posted to microsoft.public.excel.newusers
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2011
Posts: 3,685
Default Print Area

Hi Nick,

Am Tue, 22 Jul 2014 19:25:00 +0100 schrieb Nick31:

Can I have your help; I have an range with data A1:T20. Can you define
it as print area if it contains any letters or numbers in cell G10?


in the code window of your sheet:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) < "G10" Then Exit Sub
PageSetup.PrintArea = IIf(Len(Target) 0, "$A$1:$T$20", "")
End Sub


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional


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
File, print area, clear area, is not working cblind New Users to Excel 2 September 12th 07 04:51 PM
set area in excel not giving me option to set print area? J Littlebear Excel Discussion (Misc queries) 3 May 30th 07 12:49 AM
print area across the freeze panes area tom Excel Worksheet Functions 2 January 6th 07 05:23 PM
Macro - Set Print Area for Changing Data Area ksp Excel Programming 5 May 15th 06 10:20 PM
How do you turn off a print area for a page? (no print area) Grunen Excel Discussion (Misc queries) 4 October 8th 05 07:46 PM


All times are GMT +1. The time now is 07:20 PM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017