A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

countif



 
 
Thread Tools Display Modes
  #1  
Old June 3rd, 2010, 12:04 AM posted to microsoft.public.excel.worksheet.functions
Jim W
external usenet poster
 
Posts: 7
Default countif

I am trying to count the number of cells in column B="large" when the
condition in column A="week1". I tried the formula below and it counted all
the "week1"s along with the "large". Any Ideas?

=COUNTIF(A3:A12,"week1")+COUNTIF(B3:B12,"large")


  #2  
Old June 3rd, 2010, 12:37 AM posted to microsoft.public.excel.worksheet.functions
L. Howard Kittle
external usenet poster
 
Posts: 516
Default countif

Try =SUMPRODUCT((A3:A12="week1")*(B3:B12="large"))

HTH
Regards,
Howard

"Jim W" Jim wrote in message
...
I am trying to count the number of cells in column B="large" when the
condition in column A="week1". I tried the formula below and it counted
all
the "week1"s along with the "large". Any Ideas?

=COUNTIF(A3:A12,"week1")+COUNTIF(B3:B12,"large")




  #3  
Old June 3rd, 2010, 06:01 AM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default countif

In case you are using xL2007 check out the function..

=COUNTIFS( Criteriarange1,Criteria1,Criteriarange2,Criteria2, ...)

--
Jacob (MVP - Excel)


"Jim W" wrote:

I am trying to count the number of cells in column B="large" when the
condition in column A="week1". I tried the formula below and it counted all
the "week1"s along with the "large". Any Ideas?

=COUNTIF(A3:A12,"week1")+COUNTIF(B3:B12,"large")


  #4  
Old June 3rd, 2010, 06:19 AM posted to microsoft.public.excel.worksheet.functions
L. Howard Kittle
external usenet poster
 
Posts: 516
Default countif

Hi Jacob,

You know...

That COUNTIFS in 2007 seems a lot more intuitive than the SUMPRODUCT of
2003.

If you check out HELP for SUMPRODUCT in 2003 it does not even get you near
to the solution I offered for the question posed.

Only exposure to this group did I know this would work, but I can see I
might more readily grasp the 2007 'splaning of COUNTIFS in 2007. (I
think...bg)

Not ready to upgrade yet, probably wait until 2010 makes a bigger splash.

Regards,
Howard

"Jim W" Jim wrote in message
...
I am trying to count the number of cells in column B="large" when the
condition in column A="week1". I tried the formula below and it counted
all
the "week1"s along with the "large". Any Ideas?

=COUNTIF(A3:A12,"week1")+COUNTIF(B3:B12,"large")




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:03 PM.


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