+ Reply to Thread
Results 1 to 5 of 5

#DIV!/0 error when using two sets of countifs

  1. #1
    Registered User
    Join Date
    02-03-2004
    Posts
    2

    #DIV!/0 error when using two sets of countifs

    Good day,

    I am getting the dreaded #DIV!/0 error, which is being produced by the 2nd set of COUNTIFS below. I handled the first #DIV!/0 error possibility from the first set of COUNTIFS. What is it I am doing wrong. I have spent hours trying to display a blank cell instead of the #DIV!/0 error.

    =IF(ISERROR(COUNTIFS('Individual Progress'!$A:$A,Manager!$A15,'Individual Progress'!AP:AP,"100%")+COUNTIFS('Individual Progress'!$B:$B,Manager!$A15,'Individual Progress'!AP:AP,"100%")+COUNTIFS('Individual Progress'!$C:$C,Manager!$A15,'Individual Progress'!AP:AP,"100%")+COUNTIFS('Individual Progress'!$D:$D,Manager!$A15,'Individual Progress'!AP:AP,"100%")/$B$5),"", (COUNTIFS('Individual Progress'!$A:$A,Manager!$A15,'Individual Progress'!AQ:AQ,"100%")+COUNTIFS('Individual Progress'!$B:$B,Manager!$A15,'Individual Progress'!AQ:AQ,"100%")+COUNTIFS('Individual Progress'!$C:$C,Manager!$A15,'Individual Progress'!AQ:AQ,"100%")+COUNTIFS('Individual Progress'!$D:$D,Manager!$A15,'Individual Progress'!AQ:AQ,"100%"))/$B15)

  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,460

    Re: #DIV!/0 error when using two sets of countifs

    Did you know that the second half is not identical to the first? If you have a new enough version of Excel, the IFERROR function would give you a more streamlined formula.
    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
    02-25-2014
    Location
    Finger lakes , NY
    MS-Off Ver
    Excel 2007, 2010
    Posts
    1

    Re: #DIV!/0 error when using two sets of countifs

    The countifs don't matter. It is the $B$5 and the $B15 that cannot be Zero. Just use logic function - =IF(OR($B$5=0,$B15=0)," ","Desired result here")

  4. #4
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: #DIV!/0 error when using two sets of countifs

    As you are using COUNTIFS you must have IFERROR so:

    =IFERROR(COUNTIFS('Individual Progress'!$A:$A,Manager!$A15,'Individual Progress'!AP:AP,"100%")+COUNTIFS('Individual Progress'!$B:$B,Manager!$A15,'Individual Progress'!AP:AP,"100%")+COUNTIFS('Individual Progress'!$C:$C,Manager!$A15,'Individual Progress'!AP:AP,"100%")+COUNTIFS('Individual Progress'!$D:$D,Manager!$A15,'Individual Progress'!AP:AP,"100%")/$B$5),"")
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  5. #5
    Registered User
    Join Date
    02-03-2004
    Posts
    2

    Re: #DIV!/0 error when using two sets of countifs

    We rewrote the formula to this and it appears to be perfect now. Thanks for the ideas.

    =IFERROR(IF((COUNTIFS('Individual Progress'!$A:$A,Manager!$A5,'Individual Progress'!AP:AP,"100%")+ COUNTIFS('Individual Progress'!$B:$B,Manager!$A5,'Individual Progress'!AP:AP,"100%")+ COUNTIFS('Individual Progress'!$C:$C,Manager!$A5,'Individual Progress'!AP:AP,"100%")+ COUNTIFS('Individual Progress'!$D:$D,Manager!$A5,'Individual Progress'!AP:AP,"100%")) /$B$5,"", (COUNTIFS('Individual Progress'!$A:$A,Manager!$A5,'Individual Progress'!AQ:AQ,"100%")+ COUNTIFS('Individual Progress'!$B:$B,Manager!$A5,'Individual Progress'!AQ:AQ,"100%")+ COUNTIFS('Individual Progress'!$C:$C,Manager!$A5,'Individual Progress'!AQ:AQ,"100%")+ COUNTIFS('Individual Progress'!$D:$D,Manager!$A5,'Individual Progress'!AQ:AQ,"100%"))/$B5),"")

+ 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. Help with this countifs error!
    By husni in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-24-2014, 04:04 AM
  2. COUNTIFS Error
    By whizbee in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 07-19-2013, 04:33 PM
  3. COUNTIFS Error
    By mgsc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2013, 10:01 AM
  4. Replies: 0
    Last Post: 12-16-2011, 09:01 AM
  5. Error using countifs
    By welchs101 in forum Excel General
    Replies: 6
    Last Post: 11-08-2011, 08:20 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