Excel 2000 Dynamically Set Print Area

T

Tom Farrell

I have used the following solution several times successfully to
dynamically set a print area, but am having a problem with a sheet
that has formulas to populate data from another sheet. Is there a way
to adjust this offset to disregard the cells with forulas and set the
print area to just imported/filled data?



Insert=>Name=>Define
in the name box
Sheet2!Print_Area

in the refers to box:
=OFFSET(SHEET2!$A$1,0,0,COUNTIF(SHEET2!$A:$A,"<>"),COUNTIF(SHEET2!$1:$1,"<>"))


TIA
Tom Farrell
 
B

Bill Manville

Tom said:
Is there a way
to adjust this offset to disregard the cells with forulas and set the
print area to just imported/filled data?

Try replacing
COUNTIF(Sheet2!$A:$A,"<>")
with
COUNTA(Sheet2!$A:$A)-COUNTIF(Sheet2!$A:$A,"")

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top