View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Sheeloo Sheeloo is offline
external usenet poster
 
Posts: 793
Default Counting values in one cell based on values in another

Comparisons return True or False... when you put two minus signs in front
they are converted into 1 or 0... which then sumproduct adds up after
multiplying the paired values... hence the name SumProduct

"S2" wrote:

Beautiful...& simple too! Thanks!

Quick q - what do the "--" mean/do?

"Teethless mama" wrote:

=SUMPRODUCT(--(A2:A5&B2:B5="1X"))


"S2" wrote:

Greetings all -
I have the following data:
A B
1 Pri State
2 1 X
3 2
4 1
5 3 X

For each value (Priority) in ColA, I need to know how many times "X" occurs
in State (ColB)