View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Finding the first empty cell in a column

Hi Tegger,

Thanks for the response Norman. I have looked up the range
data type end the end property but can not find any mention to
the value 'two' in End(xlDown)(2). I am using Excel 2002. Is it
possible it is not suported in this version? If I step through the
example and watch rng it's type changes to Range/Range


The expression:

Set rng = Range("A1").End(xlDown)(2)


is an abbreviated version of:

Set rng = Range("A1").End(xlDown).Item(2, 1).

Chip Pearson hosts an excellent discussion, written by Alan Beban, of this
method at:

http://www.cpearson.com/excel/cells.htm

The above expressions are equivalent to:

Set rng = Range("A1").End(xlDown).Offset(1, 0)

and perhaps this would not cause you similar concern.


---
Regards,
Norman