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

Fantastic! Worked like a charm...
but can you explain what the "--" means?

"Rowan" wrote:

If you data starts in Row 2 with the Names in column A and the Y/N in column
B then in C2 put the formula:

=SUMPRODUCT(--($A$2:A2=A2),--($B$2:B2="Y"))

and copy down.

Hope this helps
Rowan

"Melissa" wrote:

I have a table like this:
Row Name Y/N? No. of Y
1 Adam Y 1
2 Adam Y 2
3 Adam N 2
4 Adam N 2
1 Brian Y 1
2 Brian N 1
3 Brian N 1
4 Brian Y 2

Is there a formula I can put for "No. of Y" that counts the no. of times "Y"
appears for Adam from the first "Adam" row up to the current row? The
counting should restart for Brian and not accumulate from Adam's total.

Note that the starting point for each person is when "Row" = 1.

Can a pivot table help?