sumproduct or countif
Hi,
The first one did not work, but the 2nd one worked, thank you so much.
"T. Valko" wrote:
So, the criteria is: O20:O79 = A *OR* B
Try one of these:
=SUMPRODUCT((O20:O79={"a","b"})*Q20:Q79)
=SUM(SUMIF(O20:O79,{"a","b"},Q20:Q79))
--
Biff
Microsoft Excel MVP
"freebee" wrote in message
...
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.
|