Thread: Conditional Sum
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Sheeloo[_5_] Sheeloo[_5_] is offline
external usenet poster
 
Posts: 248
Default Conditional Sum

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

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

-Sheeloo
-------------------------------------
Pl. click ''Yes'' if this was helpful...



"Yuki" wrote:

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!