Thread: End property
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Zone[_3_] Zone[_3_] is offline
external usenet poster
 
Posts: 373
Default End property

Go up from the bottom instead:
cells(rows.count,"a").end(xlup).row

"Stefi" wrote in message
...
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