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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top