View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default dynamic print ranges ...

You can define a dynamic range for the print area. First define your print
area the usual way (File menu). Then go to Insert menu Names Define, and
select Print_Area. Enter a formula like this in the Refers To box (replacing
the hard-coded cell address):

=OFFSET(Sheet1!$A$1,0,0,710,COUNT(Sheet1!$2:$2))

The print area will be as wide as you have elements in row 2, so if there
are no blank cells in row 2, it will give the result you want, and ignore
headers in row 1 that extend further than the data.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"manfareed" wrote in message
...
hi ,

I need to be able to set a print range according to the last column with
data. The last used column varies with different entitities. The last row
on
the print range should always be 710.

Thanks