View Single Post
  #3   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

BTW, D2 houses a first day date like 1-Sep-05.

Aladin Akyurek wrote:

Let A2:B16 house the sample you provided.

Some options...

If you have Longre's morefunc.xll add-in...

=COUNTDIFF(IF($B$2:$B$16-DAY($B$2:$B$16)+1=D2,$A$2:$A$16,0),FALSE,0)

which must be confirmed with control+shift+enter.

Otherwise...

Either:

=SUMPRODUCT(--($A$2:$A$16<""),--($B$2:$B$16-DAY($B$2:$B$16)+1=D2),--(MATCH($A$2:$A$16&$B$2:$B$16,$A$2:$A$16&$B$2:$B$16 ,0)=ROW($B$2:$B$16)-ROW($B$2)+1))


Or:

=SUM(IF(FREQUENCY(IF(($B$2:$B$16-DAY($B$2:$B$16)+1=D2)*($A$2:$A$16<""),MATCH($A$2: $A$16,$A$2:$A$16,0)),ROW($B$2:$B$16)-ROW($B$2)+1)0,1))


[...]