+ Reply to Thread
Results 1 to 8 of 8

Calculate Yes/No percentages

  1. #1
    Registered User
    Join Date
    01-27-2022
    Location
    New York
    MS-Off Ver
    Office 365
    Posts
    4

    Calculate Yes/No percentages

    Hi all - I’m trying to create a formula that will determine the pass/fail percentages for individual students. I know I can use the COUNTIF and COUNTA functions, but how can I create a formula that will take only calculate the pass/fail percentage for Jeremy? (See below)

    Table 1 - Jeremy - John - David - Jeremy
    Table 2 - Pass - Fail - Pass - Fail

    I know it would be something like If Table 1 = “Jeremy”, Then COUNTIF/COUNTA, but I’m struggling with actually coming up with the formula.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: Calculate Yes/No percentages

    Try COUNTIFS()....
    =countifs(range-with-name,"Jeremy", range-with-pass/fail,"Pass")

    Alternatively, you could put the Name and Pass or Fail in their own cells and then reference those cells, to make it more dynamic.
    =countifs(range-with-name,A1, range-with-pass/fail,B1)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-27-2022
    Location
    New York
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Calculate Yes/No percentages

    Thanks! So if I wanted to calculate the percentage then I would do:

    COUNTIFS()....
    =countifs(range-with-name,"Jeremy", range-with-pass/fail,"Pass")/counta(range-with-name,”Jeremy”, range-with-pass-fail)?

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: Calculate Yes/No percentages

    Not quite, counta doesnt take arguments, so...
    =countifs(range-with-name,"Jeremy", range-with-pass/fail,"Pass")/countifs(range-with-name,"Jeremy")

    That would give just Jeremy passes

  5. #5
    Registered User
    Join Date
    01-27-2022
    Location
    New York
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Calculate Yes/No percentages

    That works, thanks! Is there another function I can use besides COUNTA, in case Jeremy has a blank field?

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: Calculate Yes/No percentages

    If he has a blank, then he didnt score...therefor it wouldnt count towards his %

  7. #7
    Registered User
    Join Date
    01-27-2022
    Location
    New York
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Calculate Yes/No percentages

    Oh okay, thanks!

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: Calculate Yes/No percentages

    no problem

+ 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. How to calculate percentages?
    By bagpuss in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-23-2021, 08:53 PM
  2. Replies: 1
    Last Post: 11-28-2019, 09:23 AM
  3. Calculate percentages
    By m_k in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-13-2013, 05:43 AM
  4. Calculate percentages
    By TomBP in forum Access Tables & Databases
    Replies: 6
    Last Post: 10-30-2010, 02:10 PM
  5. How to calculate carpark percentages
    By bigjimmy in forum Excel General
    Replies: 1
    Last Post: 07-08-2009, 07:46 AM
  6. Calculate percentages
    By samfl98 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-15-2007, 05:25 PM
  7. Calculate different percentages from number, help?
    By PictureMeRollin in forum Excel General
    Replies: 1
    Last Post: 02-26-2005, 05:08 PM

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