+ Reply to Thread
Results 1 to 5 of 5

countif or sumproduct to count if criteria set

  1. #1
    Registered User
    Join Date
    03-10-2005
    MS-Off Ver
    Excel 2013
    Posts
    95

    countif or sumproduct to count if criteria set

    hi all,

    i need to know how to count row if certain criteria is set as per the picture,

    i want to count how many fruit in jan, feb, mar and so on if the criteria set to "fruit"
    (i give the wanted answer in H3:Q3, and the criteria sets in F2 "Fruit")

    if we using sumproduct..it will sum and not count so i guess we should using another formula.

    thanks for helping

    fruit.jpg
    Last edited by koi; 07-17-2012 at 06:29 PM.

  2. #2
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: countif or sumproduct to count if criteria set

    OP, try this:

    Please Login or Register  to view this content.
    for others, OP has provided a sample file in this other thread:

    http://www.excelforum.com/showthread...=1#post2861028
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  3. #3
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: countif or sumproduct to count if criteria set

    Hi,

    Try.

    =SUMPRODUCT((H7:H13<>"")*($F7:$F13=$F2))

    If you are on Excel 2007 or later,

    =COUNTIFS(H7:H13,"<>",$F7:$F13,$F2)
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  4. #4
    Registered User
    Join Date
    03-10-2005
    MS-Off Ver
    Excel 2013
    Posts
    95

    Re: countif or sumproduct to count if criteria set

    thanks icestationz and haseeb, both working good.. just a question what is "<>" means in this formula?

  5. #5
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: countif or sumproduct to count if criteria set

    "<>" means 'Is Not Blank' could be anything. Number, text, 'space' just checking cell is not blank

+ 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