View Single Post
  #2   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

=SUMPRODUCT(--(A1:A50=1),--(B1:B50="X"))
will give you what you what you want. Change 50 to the last row of your
data...

You can also try in E1
=SUMPRODUCT(--(A1:A50=C1),--(B1:B50=D1))
with 1 in C1, and X in D1

"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)