+ Reply to Thread
Results 1 to 4 of 4

Use of SUMPRODUCT/COUNTIF?

  1. #1
    Registered User
    Join Date
    02-22-2009
    Location
    Baltimore, Maryland
    MS-Off Ver
    Excel 2003
    Posts
    10

    Use of SUMPRODUCT/COUNTIF?

    I have to columns worth of data, the first column is the 'type' the second is the 'outcome' with the outcome either being yes or no.

    I need to be able to count the number of times the outcome is 'yes' for each 'type'

    I attached a small sample...
    Attached Files Attached Files

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Use of SUMPRODUCT/COUNTIF?

    Yes, you can use SUMPRODUCT, i.e. in B15 copied down

    =SUMPRODUCT(--(A$2:A$12=A15),--(B$2:B$12="Y"))

  3. #3
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Use of SUMPRODUCT/COUNTIF?

    Quote Originally Posted by mfiery View Post
    I have to columns worth of data, the first column is the 'type' the second is the 'outcome' with the outcome either being yes or no.

    I need to be able to count the number of times the outcome is 'yes' for each 'type'

    I attached a small sample...
    You can also use a Pivot Table to provide the result required.
    See example uploaded
    Attached Files Attached Files
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

  4. #4
    Forum Contributor mubashir aziz's Avatar
    Join Date
    03-18-2009
    Location
    Lahore, Pakistan
    MS-Off Ver
    MS Office 2013
    Posts
    533

    Re: Use of SUMPRODUCT/COUNTIF?

    you can even array formula which is sometimes ver help ful to understand and solve the problems .......

    AFter entering press Control + Shift + Enter (CSE)

    =SUM(IF($A$2:$A$12=A15,1,0)*IF($B$2:$B$12="Y",1,0))
    Attached Files Attached Files
    If this post helps, Please don't 4get to click the star icon located at the bottom left of my Post.

+ 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