Another straightforward play which gets you there ..
Assume data as posted in cols A and C, from row2 down
In D2, copied down:
=IF(SUMPRODUCT((A$2:A2<>"")*(C$2:C2<>"")*(A$2:A2=A2)*(C$2:C2=C2))>1,"",SUMPRODUCT((A$2:A2<>"")*(C$2:C2<>"")*(A$2:A2=A2)*(C$2:C2=C2)))
Then, assuming you have listed the unique fruits:
apples, oranges, bananas
in F2:F4
Simply, place in G2, copy down: =SUMIF(B:B,E2,C:C)
will return the required figs for each fruit
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Makaron" wrote:
> I am trying to count unique pairs of cells in different columns. For
> instance, I have:
>
> "A" "C"
> 1 apples
> 2 oranges
> 2 oranges
> 2 oranges
> 3 bananas
> 4 oranges
> 4 oranges
> 5 apples
> oranges
> 6
> 7 apples
> 7 apples
>
> I am trying to count the total number of unique pairs of cells that have
> particular (non-blank) entry in the second column AND a nonzero corresponding
> value in the first (for example, for "oranges" I would like to end up with a
> count of 2; for "apples" - with 3, and a total count of 6)
>
> Thank you very much in advance - I appreciate it!