#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default CountIF

I am trying to make excel count the number of cells that have a certain
criteria. Lets say that I want it to count how many of the cells in a list
say "Yes". I would enter COUNTIF(A1:A100, "Yes"). What I want to do is make
the criteria a little more complicated.

I only want it to count the cells in that column that say "yes", but also
the ones in the column next to it that say "Yes" as well.

I only want it To count it once. For example lets say A2 and B2 both say
yes, I only want it to count that as 1.

Is this possible?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default CountIF

hi
try this...
=sumproduct((A1:A100="Yes")*(B1:B100="Yes"))

regards
FSt1

"John" wrote:

I am trying to make excel count the number of cells that have a certain
criteria. Lets say that I want it to count how many of the cells in a list
say "Yes". I would enter COUNTIF(A1:A100, "Yes"). What I want to do is make
the criteria a little more complicated.

I only want it to count the cells in that column that say "yes", but also
the ones in the column next to it that say "Yes" as well.

I only want it To count it once. For example lets say A2 and B2 both say
yes, I only want it to count that as 1.

Is this possible?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default CountIF

Hi John,
Try:
=SUMPRODUCT(--(((A1:A100="yes")+(B1:B100="yes"))0))
Regards - Dave.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default CountIF

In C2 use =IF(A2="yes","x",(IF(B2="yes","x",""))), then countif the x's at
the bottom of the column.


"John" wrote in message
...
I am trying to make excel count the number of cells that have a certain
criteria. Lets say that I want it to count how many of the cells in a
list
say "Yes". I would enter COUNTIF(A1:A100, "Yes"). What I want to do is
make
the criteria a little more complicated.

I only want it to count the cells in that column that say "yes", but also
the ones in the column next to it that say "Yes" as well.

I only want it To count it once. For example lets say A2 and B2 both say
yes, I only want it to count that as 1.

Is this possible?



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 dinadvani via OfficeKB.com Excel Discussion (Misc queries) 3 July 27th 06 10:59 AM
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM


All times are GMT +1. The time now is 06:26 PM.

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"