View Single Post
  #2   Report Post  
Otto Moehrbach
 
Posts: n/a
Default

Not knowing what your range looks like I'll assume you want a range starting
at A1 and going down to the last occupied cell in Column A. I'll also
assume you want to name this range "MyRange".
To define and name the range, use:
Range("A1", Range("A" & Rows.Count).End(xlUp)).Name = "MyRange"
The cell address of the last occupied cell in Column A is:
Range("A" & Rows.Count).Address
If you want to use the range name in identifying the last cell of the range,
use:
Range("MyRange")(Range("MyRange").Count).Address
HTH Otto
"Ant" wrote in message
...
I am looking for code that automatically defines/names a range which
changes
each month. Also I need the code which identifies the location of the last
cell in the range.