kc0hwa said:
* For XL2007 and later:
COUNTIFS($a$3:$a30,4,$b$3:$b30,5)
* For XL2003 and earlier:
SUMPRODUCT(($a$3:$a30=4)*($b$3:$b30=5)) [....]
SUMPRODUCT(--(($a$3:$a30=4)+($b$3:$b30=5)>0))
[....]
if the cell, is string will this work
The COUNTIFS works regardless of whether the cell content is text or
numeric.
The SUMPRODUCT needs to be changed as follows:
SUMPRODUCT(($a$3:$a30="4")*($b$3:$b30="5"))
or
SUMPRODUCT(--(($a$3:$a30="4")+($b$3:$b30="5")>0))
If you have further questions, please indicate what version of Excel you are
using (XL2003, XL2007, XL2010, etc) and which solution best fits your needs:
COUNTIFS, SUMPRODUCT with "*", or SUMPRODUCT with "+".
That way, I do not have to duplicate so many things.