Microsoft® Excel® based database addin

 

+ Reply to Thread
Results 1 to 4 of 4

Thread: countif

  1. #1
    Jim W Guest

    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. #2
    L. Howard Kittle Guest

    Default Re: countif

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

    HTH
    Regards,
    Howard

    "Jim W" <Jim W@discussions.microsoft.com> wrote in message
    news:98835464-5840-4C8F-ABE3-0FFABEE321A2@microsoft.com...
    >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. #3
    Jacob Skaria Guest

    Default RE: 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. #4
    L. Howard Kittle Guest

    Default Re: 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 W@discussions.microsoft.com> wrote in message
    news:98835464-5840-4C8F-ABE3-0FFABEE321A2@microsoft.com...
    >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")
    >
    >




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts