#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Phillycheese5
 
Posts: n/a
Default COUNTIF Question


I need a formula that does the following: count the number of "APPLES"
in the range B1:B5 when the corresponding value in the range A1:A5 is
positive. In this case the answer should be 3.

I have data set up like this in column A and B:

+100 APPLES
+150 APPLES
+200 ORANGES
+250 APPLES
-100 APPLES

Thanks,
Phillycheese


--
Phillycheese5
------------------------------------------------------------------------
Phillycheese5's Profile: http://www.excelforum.com/member.php...o&userid=24196
View this thread: http://www.excelforum.com/showthread...hreadid=507370

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default COUNTIF Question

Try...

=SUMPRODUCT(--(A1:A50),--(B1:B5="Apples"))

Hope this helps!

In article
,
Phillycheese5
wrote:

I need a formula that does the following: count the number of "APPLES"
in the range B1:B5 when the corresponding value in the range A1:A5 is
positive. In this case the answer should be 3.

I have data set up like this in column A and B:

+100 APPLES
+150 APPLES
+200 ORANGES
+250 APPLES
-100 APPLES

Thanks,
Phillycheese

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BenjieLop
 
Posts: n/a
Default COUNTIF Question


Phillycheese5 Wrote:
I need a formula that does the following: count the number of "APPLES"
in the range B1:B5 when the corresponding value in the range A1:A5 is
positive. In this case the answer should be 3.

I have data set up like this in column A and B:

+100 APPLES
+150 APPLES
+200 ORANGES
+250 APPLES
-100 APPLES

Thanks,
Phillycheese


=SUMPRODUCT((B1:B5=\"APPLES\")*(A1:A50))

is your formula.

Regards.


--
BenjieLop


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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Phillycheese5
 
Posts: n/a
Default COUNTIF Question


Both formulas work perfectly...thank you.


--
Phillycheese5
------------------------------------------------------------------------
Phillycheese5's Profile: http://www.excelforum.com/member.php...o&userid=24196
View this thread: http://www.excelforum.com/showthread...hreadid=507370

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BenjieLop
 
Posts: n/a
Default COUNTIF Question


Thank you for the feedback ...

Regards.


--
BenjieLop


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

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
CountIf Question Boulder257 Excel Discussion (Misc queries) 3 January 26th 06 12:43 PM
I have a question regarding countif formula. Fahad Farid Ansari Excel Worksheet Functions 6 October 1st 05 11:57 PM
countif question using 2 conditions Flutie99 Excel Worksheet Functions 5 June 30th 05 08:13 PM
COUNTIF Question zbert Excel Worksheet Functions 1 November 1st 04 01:59 AM
COUNTIF Question zbert Excel Worksheet Functions 2 October 31st 04 05:14 PM


All times are GMT +1. The time now is 08:32 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"