Hi,
I am using xl2010 and xl2003.
In VBA I am trying to extract the final row from a Range. e.g. if my range variable is A1:B42 I would like to extract 42.
I could have something like:
However xl down may not be 42. Also xlup may not be 42.
For the purpose of this example i have used A1:B42, this would be a variable in reality.
Any help would be much appreciated.
Many Thanks
I am using xl2010 and xl2003.
In VBA I am trying to extract the final row from a Range. e.g. if my range variable is A1:B42 I would like to extract 42.
I could have something like:
Code:
Dim rngTest as Range
Set rngTest = Range("A1:B42")
rngTest.cells(1,1).end(xldown).row
However xl down may not be 42. Also xlup may not be 42.
For the purpose of this example i have used A1:B42, this would be a variable in reality.
Any help would be much appreciated.
Many Thanks