View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Counting cells with data in them

True, but this apparently isn't an issue for the original poster:

Range(Selection, Selection.End(xlDown)).Select
This selects all the cells down to the last cell that has data in it but


I would guess that Dave tried it several years ago and is aware of the
difference.

--
Regards,
Tom Ogilvy


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