View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default Formula to count cells between dates excluding duplicates

Hi!

Try this:

Entered as an array using the key combo of CTRL,SHIFT,ENTER:

=SUM(N(FREQUENCY(IF((A33:A2006=Date1)*(A33:A2006< Date1+7)*(B33:B2006="A5055"),MATCH(C33:C2006,C33:C 2006,0)),MATCH(C33:C2006,C33:C2006,0))0))

In order to shorten the formula just a little I used a named formula:

Date1 refers to:

=$C$5-CHOOSE(WEEKDAY($C$5),0,1,2,3,4,5,6)

Biff

"Vegs" wrote in message
...
I need this formula to exclude duplicate S/N which are enterd in C33:C2006
for the part "A5055"

=SUMPRODUCT(--($A$33:$A$2006=$C$5-CHOOSE(WEEKDAY($C$5),0,1,2,3,4,5,6)),--($A$33:$A$2006<$C$5-CHOOSE(WEEKDAY($C$5),0,1,2,3,4,5,6)+7),--($B$33:$B$2006="A5055")