+ Reply to Thread
Results 1 to 3 of 3

What am I doing wrong with this COUNTIF formula?

Hybrid View

AndyFox42 What am I doing wrong with... 01-03-2013, 12:45 PM
TMS Re: What am I doing wrong... 01-03-2013, 12:47 PM
AndyFox42 Re: What am I doing wrong... 01-03-2013, 12:49 PM
  1. #1
    Registered User
    Join Date
    01-03-2013
    Location
    Scranton, PA
    MS-Off Ver
    Excel 2010
    Posts
    4

    What am I doing wrong with this COUNTIF formula?

    I am trying to organize some data, and calculate what percentage of the time the answer is "Yes." The data consist of either Yes, No, or N/A. I want to see what percentage of responses are Yes, but exclude the N/A's from the denominator. This is the formula I am using:

    =COUNTIF(O5:O26, "Yes") / COUNTIF(O5:O26, "Yes"+"No")

    I am getting a #DIV/0! error. Is there an alternate way to do this, so my percentage is not rendered inaccurate because the N/A's are factored in when calculating how many entries are "Yes?"

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,163

    Re: What am I doing wrong with this COUNTIF formula?

    One way:

    =COUNTIF(O5:O26, "Yes") / (COUNTIF(O5:O26, "Yes") + COUNTIF(O5:O26, "No"))


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-03-2013
    Location
    Scranton, PA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: What am I doing wrong with this COUNTIF formula?

    Perfect! Thanks!

+ 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