Thread: End property
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default End property

Try:-

LastRow = Range("A65536").End(xlUp).Row


Mike

"Stefi" wrote:

Hi All,

I wanted to use
Columns("A:A").End(xlDown).Row
to determine last cell in column A. Column A has a header in A1.
Columns("A:A").End(xlDown).Row gives the correct result if I have at least
one not blank cell (A2) in column A, but gives 65536 if I have only the
header. I'd expect 1 as result.

Is there a simple way of getting 1 in this case, other then complicated IF
structures?

Thanks,
Stefi