View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
JMay JMay is offline
external usenet poster
 
Posts: 468
Default sumproduct or countif

=SUMPRODUCT(--(A1:A10="a")+--(A1:A10="b"),B1:B10)

change column letters row numbers according to your set up..

"freebee" wrote:

Hi, I need to sum numbers in one column based on 2 critarias from another
column, I have formula as
=SUMPRODUCT(--($O$20:$O$79="a"),--($O$20:$O$79="b"),$Q$20:$Q$79)
but the result showed 0.
Am I correct for using sumproduct or shall I use countif (which I haven't
learned yet)?
Thank you.