Thread: Find print area
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary L Brown
 
Posts: n/a
Default Find print area

ActiveSheet.Cells.SpecialCells(xlLastCell).Address

HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"enginguven" wrote:

I have a data set with varying range. The maximum column limits are A and AB.
There is no upper limit for number of rows but data set starts from the 23rd
row. I want a macro to find the last nonempty row and column and return their
position. So in the end it would choose this area as a "Print_Area".
For example: If the last filled column is Z and the last filled row is 2876,
I want the macro to return Z2876. So I would set A23:Z2876 as the print area.

Please help meee!!!