+ Reply to Thread
Results 1 to 3 of 3

Counting based on multiple criteria

Hybrid View

cubsfan Counting based on multiple... 04-20-2006, 03:26 PM
wjohnson I would make a "Helper"... 04-20-2006, 04:18 PM
Guest Re: Counting based on... 04-20-2006, 06:35 PM
  1. #1
    Registered User
    Join Date
    04-07-2006
    Posts
    10

    Counting based on multiple criteria

    I have two columns that have drop down boxes with either a Yes or a No as the only inputs. I need to be able enter a formula that counts up the total "No" inputs in one column but count it up only if the other column says yes. Any suggestions.

  2. #2
    Forum Contributor
    Join Date
    12-14-2005
    Posts
    176
    I would make a "Helper" column and then just count the "true" values:
    Example:
    Cell A1=no
    Cell B1=yes
    In cell C1 - enter the following formula =AND(A1="no",B1="yes") - then copy down as far as you need.
    This should equate to "TRUE" in C1 - Then you just use a formula to count the number of TRUE's in Column C - using the COUNTIF function.

  3. #3
    Dave Peterson
    Guest

    Re: Counting based on multiple criteria

    =sumproduct(--(a1:a10="no"),--(b1:b10="yes"))

    will count the number of No's in column A only if there's a Yes in column B.

    Adjust the ranges to match--but you can't use whole columns.

    =sumproduct() likes to work with numbers. The -- stuff changes trues and falses
    to 1's and 0's.

    Bob Phillips explains =sumproduct() in much more detail here:
    http://www.xldynamic.com/source/xld.SUMPRODUCT.html

    And J.E. McGimpsey has some notes at:
    http://mcgimpsey.com/excel/formulae/doubleneg.html

    cubsfan wrote:
    >
    > I have two columns that have drop down boxes with either a Yes or a No
    > as the only inputs. I need to be able enter a formula that counts up
    > the total "No" inputs in one column but count it up only if the other
    > column says yes. Any suggestions.
    >
    > --
    > cubsfan
    > ------------------------------------------------------------------------
    > cubsfan's Profile: http://www.excelforum.com/member.php...o&userid=33272
    > View this thread: http://www.excelforum.com/showthread...hreadid=534737


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1