SUM IF SUMPRODUCT

M

mparker

I have two varialbles, I want to sum the second based on criteria from both.
So I want to count all the 1s in variable two if variable 1 is 2. I have a
couple formulas but none seem to work. This is what my data looks like
V1 v2
1 1
1 2
1 1
2 3
2 2
1 4
1
1
 
R

Ron Coderre

With your posted data in columns A and B,
this formula sums the Col_B items where
the corresponding Col_A item is 2:
=SUMIF(A2:A10,2,B2:B10)

Does that help?

Regards,

Ron Coderre
Microsoft MVP (Excel)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top