View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
SunTzuComm SunTzuComm is offline
external usenet poster
 
Posts: 30
Default Counting cells with data in them

Good idea! I'd forgotten about CountA. But you need to use

Set myRng = .Range("D1", .Range("D65536").End(xlUp))

because

Set myRng = .Range("d1", .Range("d1").End(xlDown))

will stop at the first empty cell in Column D. I just tried it.

Regards,
Wes