count a cell to met 2 criteria

January 10, 2011 at 10:05:51
Specs: Windows XP
i got this cell

class gender name color
D1 m ada blue
D1 m sofi yellow
D1 f vet blue
D2 f cris green
D2 m daud red
D3 m thi green
D4 f gon red
D4 f sor blue
D4 m tina blue

i want to count the no of blue color in the above cell. but the condition is D1 only.
how would the formula be if it will cover the whole cell from a1 to d9.

answer: no of blue color of class d1 = 2


See More: count a cell to met 2 criteria

Report •


#1
January 10, 2011 at 12:11:59
re: "i got this cell"

I believe that you are using the wrong term when you say cell.

A cell is an individual junction of a Row and a Column. Each of these is a cell:

A1
B15
CC147

What you have is a range of cells which is often referred to as simply a range.

A1:D9

Try this formula:

=SUMPRODUCT((A1:A9="D1")*(D1:D9="blue"))

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
January 19, 2011 at 07:40:54
Thank you for the reply.

is the any other formula?

i want the formula to cover the range of cell from A1 to D9. "A1:D9"


Report •

#3
January 19, 2011 at 11:38:18
re: "is the any other formula?"

I'm not sure why you are asking for "any other formula".

What's wrong with the one I suggested? It returns the "2" that you asked for.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

Related Solutions


Ask Question