Countif array

P

PD

I need a formula which calculates the number of occurences of a variable
apprearing in a column if the entry in another row is equal to N or n.

I have attempted to use the below but it shows a VALUE error message:

={countif(if(A1:A10="N",C1:C10),24)}

24 being the variable to be counted and C1:C10 is the range where the
variable is listed.
 
R

Rick Rothstein \(MVP - VB\)

Your description is a little unclear to me. Does this formula do what you
want?

=SUMPRODUCT((A1:A10="N")*(C1:C10=24))

Rick
 
P

PD

Hi Rick,

Unfortunately, the below isn't giving the correct answer.

To help understand the query, the file has four columns which has the name
of the staff, customer details, Y/N and reason code for analysis. We require
the count of the specified reason codes only if the other column has a
reading of N.
 
R

Rick Rothstein \(MVP - VB\)

With the possible exception of the wrong columns being specified (I used the
columns you showed in your posting), I do not see why the formula I posted
does not do what you want. Can you show us maybe 6 lines of data from your
worksheet and then answer you expect the formula to give for the data you
post?

Rick
 

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