I try to find the last cell in a column that contains values. I know I can use something like:
Dim findme As Range = excel.Range("A1:A" & lastrow.row)
but I am looking for a way not to use this column-character format. Something like this VBA format
Dim rng as range
with myWorksheet
LastRow = .Cells(.Rows.Count, 1).End(xlUp).Row
rng = .Range(.Cells(1,1), .Cells(LastRow, 1))
end with
I created an helper class to solve this problem:
This is the way to use it:
Now you get the Range:
Range(Cells(3,3)
,Cells(LastRow, 3)
as an object.