Hi
as COUNIF only accepts one condition you have to use SUMPRODUCT. The
formula
=SUMPRODUCT((C2:C9999="E")*(D2
9999<-1))
(as well as the formulas provided by Peo and Don) will just count. To
explain this:
C2:C9999="E" will either return TRUE or FALSE. The same is true for
D2
9999<-1
SUMPRODUCT will now multiply these results row by row and add the
individual row results. So it will do something like:
TRUE*TRUE+
FALSE*TRUE+
TRUE*FALSE+
FALSE*FALSE
......
Due to this mathematical operation Excel will automatical convert these
boolean values to numbers (TRUE = 1, FALSE = 0). So the above will be
converted to
1*1+
0*1+
1*0+
0*0
=1
Peo for examples used the operator '--' to force the conversion (-- is
equal to (-1)*(-1))
If you want to add the numbers in column D the SUMPRODUCT formula would
look like
=SUMPRODUCT((C2:C9999="E")*(D2
9999<-1),(D2
9999))
or
=SUMPRODUCT((C2:C9999="E")*(D2
9999<-1)*(D2
9999))
HTH
Frank