returning a count if two conditions are met

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
 
B

Barb Reinhardt

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?
 
B

BenjieLop

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.
 
M

Mangus Pyke

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-
 
M

Mangus Pyke

{=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

Top