Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This might be of some help:
Sub range_reporter() Dim r As Range Dim s As String Set r = ActiveSheet.UsedRange nLastRow = r.Rows.Count + r.Row - 1 MsgBox ("last row " & nLastRow) nLastColumn = r.Columns.Count + r.Column - 1 MsgBox ("last column " & nLastColumn) nFirstRow = r.Row MsgBox ("first row " & nFirstRow) nFirstColumn = r.Column MsgBox ("first column " & nFirstColumn) numrow = r.Rows.Count MsgBox ("number of rows " & numrow) numcol = r.Columns.Count MsgBox ("number of columns " & numcol) s = r.Address MsgBox ("address " & s) s = r(1).Address MsgBox ("address of first cell " & s) End Sub -- Gary''s Student - gsnu200831 "MikeZz" wrote: Can someone point me to a set of functions or properties for set ranges? Specifically I'm looking for the following: For a range of cells: Upper & Lower Left Cell Address Upper & Lower Right Cell Address Left & Right Column Number Top & Bottom Row Number These are probably just properties of a range object but I can't seem to find them in help... I know it's probably one of those "it's so easy a Caveman could do it" things that I'm just missing. Thanks MikeZz |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Probably a rather basic question.... | Excel Programming | |||
Basic VBA question... | Excel Programming | |||
Another basic question... CASE with a range | Excel Programming | |||
Too Basic A Question | Excel Programming | |||
Basic VBA question | Excel Programming |