Function for different array

J

John

Hi all,

I need help on writing formula for the problem below:

Column A Column B Column C
CHJ 15 AGB
AGB 10 HHH
JKX 12 NNN
MNB 19 MMM
AGB 20 BBB
. . .
. . .
. . .

I want to be able to write " If one or more value in Column A equal to one
of the value in Column C then Sum column B ". In this case the answer is " 30
", the sum of "AGB".

Thank you
John
 
M

Ms-Exl-Learner

This Can be arrived in 2 simple ways.

=SUMIF($A$2:$A$6,$C2,$B$2:$B$6)

OR

=SUMPRODUCT(($A$2:$A$6=$C2)*($B$2:$B$6))

Change the Cell Reference A2:A6 to your desired cell in the above formula,
if required.

If this post helps, Click Yes!
 
J

John

Hi Jacob,

Thank you for the quick answer however this is what I want. I want be able
to write like:

SUMIF(A:A, C:C, B:B) - Meaning: Sum If one of the value in range A:A equal
to one of the value in range C:C then Sum B:B. So instead of C1 in your
formula, I want to be able to put the range C:C "=SUMIF(A:A,C1,B:B)"

Thank you
John
 
J

John

Thank you for the quick reply however I want to be able to put the range
instead of the reference cell only. In your formula
=SUMIF($A$2:$A$6,$C2,$B$2:$B$6) I want to be able to change C2 to $C2$:$C6$.

Thank you
John
 

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