Conditional Sum

Y

Yuki

Hi all!

I need a help to make a function to do some work for me.
In my worksheet, I have two columns. The first is about descriptions, and
the second about values.
Like this:
A B
1 Z 1
2 Z 3
3 Y 2
3 Z 8

So, I need to put in a cell, the sum of the values which have description
equal 'Z'.

Somebody could help, please?

Thanks!
 
S

Sheeloo

=SUMPRODUCT(--(A1:A100="Z"),(B1:B100))
adjust 100 to your range

You can also use
=SUMPRODUCT(--(A1:A100=A1),(B1:B100))
 
Top