+ Reply to Thread
Results 1 to 4 of 4

Countif with criteria

  1. #1
    Registered User
    Join Date
    05-30-2008
    Posts
    64

    Countif with criteria

    Hi,
    How can I use the countif function to count values in a table, only if the cell in the previous column has a "Y" value in it? I have attached some sample data. The top section has all the values and the bottom has a summary which should give a summary of the number of each level, only if they have a "Y" indicator. Is countif the right approach for this?
    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Countif with criteria

    hi ezzy85, try:
    =IF(SUMPRODUCT(($A$3:$A$25="Y")*(B$3:B$25=$A30))=0,"",SUMPRODUCT(($A$3:$A$25="Y")*(B$3:B$25=$A30)))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

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

    Re: Countif with criteria

    by the looks of it, you have Excel 2007, which has the function of COUNTIFS.

    put the following in cell B30, then drag it right and down:

    Please Login or Register  to view this content.
    - 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 -

  4. #4
    Registered User
    Join Date
    05-30-2008
    Posts
    64

    Re: Countif with criteria

    thats perfect. thanks all!

+ 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