View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tomek[_4_] Tomek[_4_] is offline
external usenet poster
 
Posts: 5
Default Last cell with data

Yes, that's right. I wasn't perhaps precise enough.. It's also the same as
selecting a cell in a given column and pressing Ctrl+Down key combination.
Assuming that the given column contains data in all cells this method is
correct and gives expected result.

"Rob van Gelder" wrote in message
...
.End(xlDown) is the same as selecting a cell, holding down the End key and
pressing the down key.
It will move down to the end of the current column's region, not the last
row containing data in that column.
It has it's uses when you have lists stacked on top of eachother.

If it's one list for the whole column, read on.

The following gets the first row up from the very last row in column
iColumnNo that contains data
Same as clicking cell A65536, holding down the End key and pressing the up
key.
i = Cells(Rows.Count, iColumnNo).End(xlUp).Row