views:

37

answers:

2

Is there any way of finding the height of the ROWS from 1 to 50, and the width of the COLUMNS from A to Z in an Excel sheet without manually clicking and writing down the answer?

Thanks

Michael.

+2  A: 

In Excel VBA you can use something like this:

Range("A1:A50").Height  

and

Range("A:Z").Width
Parkyprg
Would that just give the total height/width? Would it be possible to find out the number of lines in that range? Or possibly the height/width of each Row/Column?
Mike
For one row use Range("A1").Height (or any other number) and for width: Range("A").Width
Parkyprg
+3  A: 

To add on top of @Parkyprg

Range("A1:A50").Height      ' height of range
Range("A:Z").Width          ' width of range
Range("A1:A50").Rows.Count  ' number or rows in range
Range("A3").Height          ' height of A3 cell
Range("A3").Width           ' width of A3 cell
Edward Leno