Determine the size of a range
?Range(Range("A" & fstRow), Range("A" & fstRow).End(xlDown)).Rows.Count
3
?Range("A" & fstRow).End(xlDown).Row
7
--
Vasant
"Dr.Schwartz" wrote in message
...
Say I have values in cell A5, A6 and A7, what is the easiest way to
determine:
1. The number of rows in the range (answer = 3)
2. The last row number in the range (answer =7)
The first row number is known (5) as variable: fstRow
I can do it by counting every cell until I get to the first empty cell
with
a Do until...loop routine, but it seems like a lot of code to determine a
simple thing. Agree?
Thank you
The Doctor
|