returning a count if two conditions are met

  • Thread starter Thread starter davmason
  • Start date Start date
D

davmason

I am trying to count data entries under two conditions - ie. if it is
red and small count it, .
p.s. I am extracting data from the sheet "data" to a smaller "results"
sheet.

I have tried this formula and can't see why it doesn't work!!??.
=IF(AND(DATA!F2:F46=\"RED\",DATA!E2:E46=\"SMALL\"),COUNTA(DATA!E2:E46),\"
\")

why will this not work????
*any* advice is appreciated
thanks in advance
Dave
 
I'm not following what you are trying to do.

When you are looking for RED or SMALL, does that mean that you are looking
for values in a cell that read RED or SMALL, or do you mean something else?
 
davmason said:
I am trying to count data entries under two conditions - ie. if it is
red and small count it, .
p.s. I am extracting data from the sheet "data" to a smaller "results"
sheet.

I have tried this formula and can't see why it doesn't work!!??.
=IF(AND(DATA!F2:F46=\"RED\",DATA!E2:E46=\"SMALL\"),COUNTA(DATA!E2:E46),\"
\")

why will this not work????
*any* advice is appreciated
thanks in advance
Dave

Try this ...

=COUNTIF(DATA!F2:F46,\"RED\")+COUNTIF(DATA!E2:E46,\"SMALL\")


Regards.
 
I am trying to count data entries under two conditions - ie. if it is
red and small count it, .
p.s. I am extracting data from the sheet "data" to a smaller "results"
sheet.

I have tried this formula and can't see why it doesn't work!!??.
=IF(AND(DATA!F2:F46=\"RED\",DATA!E2:E46=\"SMALL\"),COUNTA(DATA!E2:E46),\"
\")

{=SUM(IF(data!F2:F46="RED",IF(data!E2:E46="SMALL,1,0),0)}\

This is an array. Type it without the curly brackets and enter it
using Ctrl-Shift-Enter

MP-
 
{=SUM(IF(data!F2:F46="RED",IF(data!E2:E46="SMALL,1,0),0)}\

This is an array. Type it without the curly brackets and enter it
using Ctrl-Shift-Enter

Not sure where that last slash came from. Let's try this again:

Enter:
=SUM(IF(data!F2:F46="RED",IF(data!E2:E46="SMALL,1,0),0)
Then press Ctrl-Shift-Enter to insert this formula as an array.

MP-
 

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

Back
Top