Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
set area in excel not giving me option to set print area? | Excel Discussion (Misc queries) | |||
File, print area, clear area, is not working | New Users to Excel | |||
print area across the freeze panes area | Excel Worksheet Functions | |||
Macro - Set Print Area for Changing Data Area | Excel Programming | |||
How do you turn off a print area for a page? (no print area) | Excel Discussion (Misc queries) |