Using countif based on values of cells in other columns

B

bmac

Hello, I would like the count the number of times the number "4" appears in
column D only when the value "F" appears in the same row in column B. I don't
want to sum the 4 values, I just want to count them.

Any help appreciated,

BMAC
 
T

T. Valko

Try this:

=SUMPRODUCT(--(B1:B10="F"),--(D1:D10=4))

Better to use cells to hold the criteria:

F1 = F
G1 = 4

=SUMPRODUCT(--(B1:B10=F1),--(D1:D10=G1))
 
B

bmac

Sorry, but I don't understand. I have a multi column spreadsheet with other
data not required for the calculation. In column B I have values like N, C,
F, etc. in rows 2-130. In column. In column D I have values like 4, 3, 2, 1,
or 0. I want to be able to count the instances of "4" in column D when there
is an F in column B.

Thanks for your time,
 
B

bmac

Perfect!!!!
Thanks much!

T. Valko said:
Try this:

=SUMPRODUCT(--(B1:B10="F"),--(D1:D10=4))

Better to use cells to hold the criteria:

F1 = F
G1 = 4

=SUMPRODUCT(--(B1:B10=F1),--(D1:D10=G1))
 
F

Fred Smith

Pinamedic,

How is this post helpful? This isn't a Countif function, nor is it an array
function, nor is it a proper If statement, even one that's out of context.
If your intent was to waste the poster's time, you succeeded. However, if
you want to help people, you should test your formula first before posting
it.

Regards,
Fred.
 

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