View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default regions in excel

Code like the following will get the top-left and bottom-right cells
of some range.

Dim RR As Range
Dim TopLeftCell As Range
Dim BottomRightCell As Range

Set RR = Range("C3:E5") ' some test range
Set TopLeftCell = RR(1, 1)
Set BottomRightCell = RR(RR.Cells.Count)
Debug.Print "TopLeft: " & TopLeftCell.Address, _
"BottonRight: " & BottomRightCell.Address

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Sat, 17 Jan 2009 21:52:21 -0000, "Sean Farrow"
wrote:

Hi:
is it possible to obtain the individual top and left addressesof a region,
if not how ae these presented in the address. How would one derive the
bottom and right co-ordinates?
Cheers
Sean.
"JE McGimpsey" wrote in message
...
The address property for a multi-cell range returns upper-left and
lower-right cells in the range. You can, of course, easily derive the
upper-right and lower-left addresses.



In article ,
"Sean Farrow" wrote:

Thanks for that, I take it the Address property would give the address of
the cells at the four courners of the region?