View Single Post
  #3   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

Two options...

(a)

=SUMPRODUCT(($A$2:$A$10=E2)+0,($B$2:$B$10=F2)+0)

where E2 houses a condition like C and F2 a condition like 1.

(b)

In C2 enter & copy down:

=A2&"#"&B2

Then invoke:

=COUNTIF($C$2:$C$10,E2&"#"&F2)

ckiraly wrote:
I'm trying to do something that seems easy, but just don't know how to:

I want to count the number of times column B is not blank AND column A
is a specified value. ex:

A B

C 1
C
C 1
M 1
C
C 1

So I'm looking for the number of times that "C" AND "1" occur.

Any help is greatly appreciated.

Thanks!



--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.