How do I compare two values to calculate a total?

L

lori_tig

I'm trying to compare two columns, and count it as "1" in a total, if both
cells meet individual criteria, to see if we have enough players for a
softball game.

Column D states whether the player is M of F, and column G lists a Y or N as
to whether that player is available for that specific game. So, I want to
count all the cells where D="F" and G="N", but only when both conditions are
true. This is for range 2:22 in both columns. Seemed simple enough when I
started, but I'm doing something wrong.
 
A

Ashish Mathur

Hi,

While sumproduct is a better solution, another solution is array formulas
(Ctrl+Shift+Enter)

=sum(if((D2:D22="F")*(G2:G22="N"),1,0))

Regards,

Ashish Mathur
 

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