counting

J

JRD

How do I count the number of cells in column A that contain a certain string
but only if the same row in column B contains a certain string

eg

A B
Elective Yes
Elective No
Urgent Yes
Urgent No
Elective Yes

How do I count the number of rows that contain Elective in column A and Yes
in column B. The answer here would be 2.
 
R

RagDyeR

Try this:

=Sumproduct((A1:A5="Elective")*(B1:B5="Yes"))

--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================

How do I count the number of cells in column A that contain a certain string
but only if the same row in column B contains a certain string

eg

A B
Elective Yes
Elective No
Urgent Yes
Urgent No
Elective Yes

How do I count the number of rows that contain Elective in column A and Yes
in column B. The answer here would be 2.
 
T

T. Valko

Try this:

=SUMPRODUCT(--(A1:A5="Elective"),--(B1:B5="Yes"))

Better to use cells to hold the criteria.

D1 = Elective
E1 = Yes

=SUMPRODUCT(--(A1:A5=D1),--(B1:B5=E1))
 

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