countif function

A

anand

I want to count a the occurence in 2 adjacent columns when two specific
conditions match. If there is a 5 on a given row in the first column
followed by an "a" in the next column, then that needs to be counted in two
adjacent columns of about 3000 rows.

Cany anyone advise?
 
M

Max

Try SUMPRODUCT, something alone these lines ..

Put in C2:

=SUMPRODUCT(($A$2:$A$10=5)*(TRIM($B$2:$B$10)="a"))

Adjust the ranges $A$2:$A$10, $B$2:$B$10 to suit
but note that the ranges have to be identical in structure
and you cannot use entire column refs (A:A, B:B)
in SUMPRODUCT
 
Top