Use of COUNTIF and AND function together

  • Thread starter Thread starter westhol
  • Start date Start date
W

westhol

Hi,

Is there a way I can use the COUNTIF and AND function in one formula.
e.g.
IF any of the cells of column a displays AAAA AND on the same lin
column B displays BBBB. I like to have the total fihure of thos
lines.
I've tried =COUNTIF(AND(A:A,"AAAA",B:B,"BBBB") but unfortunately thi
does not work.

Regards,

Loui
 
Hi Louis

COUNTIF (as well as SUMIF) only accepts one condition. You can use
SUMPRODUCT for more than one condition

=SUMPRODUCT((A1:A999="AAAA")*(B1:B999="BBBB"))

Frank
 
Back
Top