how to get the Range dimension?

  • Thread starter Thread starter Khaki
  • Start date Start date
K

Khaki

How do I get the dimension of a range?

Say
Dim rRange as Range

rRange = ActiveWorksheet.Range("MyRange")

and MyRange starts from B10 to D15

how can i get the starting Row and column of rRange and how many row
and columns it contains?

TIA
 
starting Row and column of rRange and how many rows
and columns it contains<<

rRange.Row
rRange.Column
rRange.Rows.Count
rRange.Columns.Count
 
Sub test()
Dim rRange As Range

Set rRange = ActiveSheet.Range("MyRange")

MsgBox "Start Row = " & rRange.Row
MsgBox "Start Col = " & rRange.Column
MsgBox "Num Rows = " & rRange.Rows.Count
MsgBox "Num Cols = " & rRange.Columns.Count
End Sub
 
Back
Top