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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top