Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Set print area

Hi guys,

I am successfully using the following macro to define and set print
area based on the presence of a column header in row A.

Range("A1:Z52").Select
ActiveSheet.PageSetup.PrintArea = "A1:OFFSET(A1,51,COUNTA
(A1:Z1)-1)"

I have now set a formula in row A for each column that will leave the
cell blank if not data is entered into a specified cell (formula used:
=IF(T2,T2,"")).

However the macro I am running to set print area obviously works on
counting blank cells and the fact that the cell contains a formula
(albeit noting is displayed) is not classed as blank.

Can anyone suggest an alternative PrintArea macro that will set print
area so that only columns with a header displayed in row A will be
printed?

Any help much appreciated (as always)

Best wishes

Paul
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
set area in excel not giving me option to set print area? J Littlebear Excel Discussion (Misc queries) 4 April 23rd 23 09:04 PM
File, print area, clear area, is not working cblind New Users to Excel 2 September 12th 07 04:51 PM
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 12:28 PM.

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

About Us

"It's about Microsoft Excel"