View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Count occurences

Dim cnt as Long
cnt = application.Countif(Range("A1:A100"),"3/10/2004")


to demo from the immediate window:
? application.Countif(Range("A1:A100"),"3/10/2004")
3

--
Regards,
Tom Ogilvy


"AvalancheMike" wrote in message
...
I've written a quick and easy macro that clears (not delete) a row when it
finds a user prompted date. I now need the macro to run for every

occurence
that it can find.
Is there a way to program Excel to count how many times a date appears? I
can then use this count in a loop.
Thanks.