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

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)