+ Reply to Thread
Results 1 to 6 of 6

COUNTIF number to calculate multiple criteria

  1. #1
    Registered User
    Join Date
    08-20-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2010
    Posts
    75

    COUNTIF number to calculate multiple criteria

    Greetings!

    Currently, I have a spreadhseet where I calculate "Y", "N", and "0".

    The COUNTIF formula I have calculating the "Y" and then converts them to percentages is as follows:
    =COUNTIF(H$16:H$28, "Y")/(ROWS(H$16:H$28)*COLUMNS(H$16:H$28))

    For example, if I have TOTAL 13 entries ("Y", "N", and "0"), then the "Y" would be 15% (2/13 = ~ 15)

    I need a formula that will do the exact same (except not accounting for the "Y" criteria, but NOW calculating for BOTH "N" and "0"), then converting it to a percentage.

    Using the example above, if I have TOTAL 13 entries ("Y", "N", and "0"), then the "N" and "0" would be 85% (11/13 = ~ 85)

    Any thoughts?

    Thanks!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: COUNTIF number to calculate multiple criteria

    It might be easier if you were to post your Excel sheet.A

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: COUNTIF number to calculate multiple criteria

    No need. There are many ways to do this...

    =(COUNTIF(H$16:H$28, "N")+COUNTIF(H$16:H$28, "o"))/COUNTA($H$16:$H$28) is but one.

    Your Y formula can be simplified to

    =COUNTIF(H$16:H$28, "y")/COUNTA($H$16:$H$28)

    the *COLUMNS(H$16:H$28) doesn't seem to do anything...

  4. #4
    Registered User
    Join Date
    08-20-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: COUNTIF number to calculate multiple criteria

    Brilliant, works like a charm! Thanks!

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: COUNTIF number to calculate multiple criteria

    Quote Originally Posted by Glenn Kennedy View Post

    =(COUNTIF(H$16:H$28, "N")+COUNTIF(H$16:H$28, "o"))/COUNTA($H$16:$H$28)
    That can be reduced to:

    =SUM(COUNTIF(H$16:H$28,{"N","O"}))/COUNTA($H$16:$H$28)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: COUNTIF number to calculate multiple criteria

    Glad to have helped! If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. It'd also be appreciated if you were to click the add Reputation button at the foot of any of the posts of those who helped you reach a solution.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Using SUMIF and COUNTIF to calculate number of particular instances against one team
    By ajw1982 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-14-2013, 04:23 AM
  2. Calculate number of departures between dates based on multiple criteria
    By IndigoIrish in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-18-2012, 03:22 PM
  3. Replies: 4
    Last Post: 12-16-2009, 04:09 PM
  4. [SOLVED] Countif using format criteria not number criteria?
    By Rumbla76 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-20-2005, 01:06 AM
  5. [SOLVED] Countif using format criteria....not number criteria?
    By Troy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-20-2005, 12:06 AM

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