UsedRange and CurrentRegion
Hi,
I need to know realy last row and column, which contains data. I tried to
use UsedRange properties of object worksheet, but this is not what I want in
all real cases:
Sheets("Sheet1").usedrange.rows.count
UsedRange.rows.count properties count also rows only with some formatting
and with no data. Then I tried to use:
Sheets("Sheet1").usedrange.CurrentRegion.rows.coun t
and seems to work OK. Do the last code example find realy last row or column
or count of them in all cases, or is there some better way to get this always
?
Thanks for answer.
Tomas M.
|