Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
davmason
 
Posts: n/a
Default returning a count if two conditions are met


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


--
davmason
------------------------------------------------------------------------
davmason's Profile: http://www.excelforum.com/member.php...o&userid=25292
View this thread: http://www.excelforum.com/showthread...hreadid=387796

  #2   Report Post  
Barb Reinhardt
 
Posts: n/a
Default

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" wrote in
message ...

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


--
davmason
------------------------------------------------------------------------
davmason's Profile:
http://www.excelforum.com/member.php...o&userid=25292
View this thread: http://www.excelforum.com/showthread...hreadid=387796



  #3   Report Post  
Bill Kuunders
 
Posts: n/a
Default

=SUMPRODUCT(--(F2:F46="RED"),--(E2:E46="SMALL"))
should work

--
Greetings from New Zealand
Bill K

"davmason" wrote in
message ...

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


--
davmason
------------------------------------------------------------------------
davmason's Profile:
http://www.excelforum.com/member.php...o&userid=25292
View this thread: http://www.excelforum.com/showthread...hreadid=387796



  #4   Report Post  
BenjieLop
 
Posts: n/a
Default


davmason Wrote:
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.


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=387796

  #5   Report Post  
Mangus Pyke
 
Posts: n/a
Default

On Sat, 16 Jul 2005 19:58:34 -0500, davmason
wrote:
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-

--
"Learning is a behavior that results from consequences."
B.F. Skinner


  #6   Report Post  
Mangus Pyke
 
Posts: n/a
Default

On Sat, 16 Jul 2005 23:18:34 -0400, Mangus Pyke
wrote:
{=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-

--
"Learning is a behavior that results from consequences."
B.F. Skinner
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
count unique with conditions \ditzman via OfficeKB.com\ Excel Worksheet Functions 8 July 8th 05 12:41 PM
Count with 2 conditions? Lee Excel Worksheet Functions 2 March 19th 05 02:45 AM
How do I count number of cels the matches 2 conditions ? Abra Excel Worksheet Functions 2 February 27th 05 08:56 PM
Count If Formula for multiple conditions?? How To?? LPrain Excel Worksheet Functions 1 December 6th 04 09:18 PM
Count Based upon Multiple Conditions hkslater Excel Worksheet Functions 4 November 19th 04 04:43 AM


All times are GMT +1. The time now is 05:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"