Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default is there a way to have 2 criterias for COUNTIF?

Please help me with following!!

A B
APPLE FRUIT
PEACH FRUIT
APPLE FRUIT
APPLE NO FRUIT
PEACH NO FRUIT

I have above list and i would like to get a cell count for
"APPLE" WITH "FRUIT"
"APPLE" WITH "NO FRUIT"
"PEACH" WITH "FRUIT"
"PEACH" WITH "NO FRUIT"

i prefer not using pivot or dcounta

thank you!!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default is there a way to have 2 criterias for COUNTIF?

=SUMPRODUCT(--(A1:A5="APPLE"),--(B1:B5="FRUIT"))

Adjust for other criteria.

HTH,
Paul

--

"doyree" wrote in message
...
Please help me with following!!

A B
APPLE FRUIT
PEACH FRUIT
APPLE FRUIT
APPLE NO FRUIT
PEACH NO FRUIT

I have above list and i would like to get a cell count for
"APPLE" WITH "FRUIT"
"APPLE" WITH "NO FRUIT"
"PEACH" WITH "FRUIT"
"PEACH" WITH "NO FRUIT"

i prefer not using pivot or dcounta

thank you!!!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default is there a way to have 2 criterias for COUNTIF?

Try, for example =SUMPRODUCT(--(A1:A10="Apple"),--(B1:B10="Fruit")) Answer
2. Adjust formula for other combinations.

Tyro

"doyree" wrote in message
...
Please help me with following!!

A B
APPLE FRUIT
PEACH FRUIT
APPLE FRUIT
APPLE NO FRUIT
PEACH NO FRUIT

I have above list and i would like to get a cell count for
"APPLE" WITH "FRUIT"
"APPLE" WITH "NO FRUIT"
"PEACH" WITH "FRUIT"
"PEACH" WITH "NO FRUIT"

i prefer not using pivot or dcounta

thank you!!!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default is there a way to have 2 criterias for COUNTIF?

Try the following:

=SUMPRODUCT((A2:A6="Apple")*(B2:B6="Fruit"))

Laura


"doyree" wrote in message
...
Please help me with following!!

A B
APPLE FRUIT
PEACH FRUIT
APPLE FRUIT
APPLE NO FRUIT
PEACH NO FRUIT

I have above list and i would like to get a cell count for
"APPLE" WITH "FRUIT"
"APPLE" WITH "NO FRUIT"
"PEACH" WITH "FRUIT"
"PEACH" WITH "NO FRUIT"

i prefer not using pivot or dcounta

thank you!!!



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default is there a way to have 2 criterias for COUNTIF?


THANK YOU THANK YOU THANK YOU!!!!!!!!!!!!!!!!!!!!!!


what's "--" in that formula mean?
thanks

"PCLIVE" wrote:

=SUMPRODUCT(--(A1:A5="APPLE"),--(B1:B5="FRUIT"))

Adjust for other criteria.

HTH,
Paul

--

"doyree" wrote in message
...
Please help me with following!!

A B
APPLE FRUIT
PEACH FRUIT
APPLE FRUIT
APPLE NO FRUIT
PEACH NO FRUIT

I have above list and i would like to get a cell count for
"APPLE" WITH "FRUIT"
"APPLE" WITH "NO FRUIT"
"PEACH" WITH "FRUIT"
"PEACH" WITH "NO FRUIT"

i prefer not using pivot or dcounta

thank you!!!






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default is there a way to have 2 criterias for COUNTIF?

Sorry to bother you but is there way to put a cell in place of "apple"?
say... C4 in place of "apple"?
thank you!!


"PCLIVE" wrote:

=SUMPRODUCT(--(A1:A5="APPLE"),--(B1:B5="FRUIT"))

Adjust for other criteria.

HTH,
Paul

--

"doyree" wrote in message
...
Please help me with following!!

A B
APPLE FRUIT
PEACH FRUIT
APPLE FRUIT
APPLE NO FRUIT
PEACH NO FRUIT

I have above list and i would like to get a cell count for
"APPLE" WITH "FRUIT"
"APPLE" WITH "NO FRUIT"
"PEACH" WITH "FRUIT"
"PEACH" WITH "NO FRUIT"

i prefer not using pivot or dcounta

thank you!!!




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default is there a way to have 2 criterias for COUNTIF?

The "--" coerces the conversion of the logical values TRUE and FALSE to be
1 and 0. One minus makes TRUE = -1 and FALSE = 0. The second minus reverses
the signs, so TRUE becomes 1 and FALSE becomes 0. Then the numbers are
multiplied and summed. For every "Apple" in A1:A5 there will be a 1 and for
every "Fruit" in B1:B5 there will be a 1. So apple and fruit in the same row
results in 1 * 1, and all other combinations result in 0.

Tyro

"doyree" wrote in message
...

THANK YOU THANK YOU THANK YOU!!!!!!!!!!!!!!!!!!!!!!


what's "--" in that formula mean?
thanks

"PCLIVE" wrote:

=SUMPRODUCT(--(A1:A5="APPLE"),--(B1:B5="FRUIT"))

Adjust for other criteria.

HTH,
Paul

--

"doyree" wrote in message
...
Please help me with following!!

A B
APPLE FRUIT
PEACH FRUIT
APPLE FRUIT
APPLE NO FRUIT
PEACH NO FRUIT

I have above list and i would like to get a cell count for
"APPLE" WITH "FRUIT"
"APPLE" WITH "NO FRUIT"
"PEACH" WITH "FRUIT"
"PEACH" WITH "NO FRUIT"

i prefer not using pivot or dcounta

thank you!!!






  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default is there a way to have 2 criterias for COUNTIF?

Yep. Put C4 in place of apple.

Tyro

"doyree" wrote in message
...
Sorry to bother you but is there way to put a cell in place of "apple"?
say... C4 in place of "apple"?
thank you!!


"PCLIVE" wrote:

=SUMPRODUCT(--(A1:A5="APPLE"),--(B1:B5="FRUIT"))

Adjust for other criteria.

HTH,
Paul

--

"doyree" wrote in message
...
Please help me with following!!

A B
APPLE FRUIT
PEACH FRUIT
APPLE FRUIT
APPLE NO FRUIT
PEACH NO FRUIT

I have above list and i would like to get a cell count for
"APPLE" WITH "FRUIT"
"APPLE" WITH "NO FRUIT"
"PEACH" WITH "FRUIT"
"PEACH" WITH "NO FRUIT"

i prefer not using pivot or dcounta

thank you!!!






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 with two criterias Ricardo Excel Discussion (Misc queries) 6 January 8th 07 11:26 PM
2 criterias for countif - Greg Excel Worksheet Functions 1 June 23rd 06 07:39 PM
Countif, two criterias need help Axel Excel Worksheet Functions 12 April 30th 06 01:22 PM
Formula format for Count or Countif funtion with two criterias Debi Excel Worksheet Functions 2 September 26th 05 08:23 PM
countif help for multiple criterias tdro Excel Worksheet Functions 2 June 14th 05 05:06 PM


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