+ Reply to Thread
Results 1 to 4 of 4

Using IFERROR function with COUNTIF

  1. #1
    Registered User
    Join Date
    06-12-2020
    Location
    Greece
    MS-Off Ver
    365 Pro
    Posts
    40

    Using IFERROR function with COUNTIF

    Hello everybody, I am an Excel beginner and happy to be here!

    I am using this formula, =COUNTIF(F5,"Yes")/(COUNTIF(F5,"Yes")+COUNTIF(F5,"No")), to be able to calculate the success rate of "Yes" and ignore N/A. It is working fine but when I try to do some more calculations I am getting the #DIV/0! error.

    Is there a way to use the iferror function in order to manually change the DIV error to N/A? That way my first formula will work without issues.

    Thank you in advance!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,635

    Re: Using IFERROR function with COUNTIF

    Welcome to the forum.

    Why are you using COUNTIF with one cell? IF will be enough.

    =IFERROR(your_formula,"N/A")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    06-12-2020
    Location
    Greece
    MS-Off Ver
    365 Pro
    Posts
    40

    Re: Using IFERROR function with COUNTIF

    Hello and thank you for your reply.

    My mistake, it is for multiple cells but you answered to my question. It worked =IFERROR(COUNTIF(B5:B6,"Yes")/(COUNTIF(B5:B6,"Yes")+COUNTIF(B5:B6,"No")),"N/A")

    Thank you so much!

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,635

    Re: Using IFERROR function with COUNTIF

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. IFERROR Function
    By scruz9 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-18-2016, 02:35 PM
  2. [SOLVED] IFERROR AND COUNTIF function problem
    By akosibhon in forum Excel General
    Replies: 6
    Last Post: 06-19-2014, 03:26 AM
  3. [SOLVED] IFERROR function with Hour function Fail
    By Kram222 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-24-2012, 12:25 AM
  4. [SOLVED] IFERROR function help
    By controlfreak in forum Excel General
    Replies: 3
    Last Post: 05-31-2012, 09:44 AM
  5. IF/IFERROR Function Help
    By karma4910 in forum Excel General
    Replies: 3
    Last Post: 12-23-2011, 04:04 PM
  6. SUM, IFERROR and COUNTIF
    By Jomathr in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-02-2009, 03:14 AM
  7. New Function in Excel 2007 - IFERROR Function
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 11-15-2007, 05:09 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