+ Reply to Thread
Results 1 to 64 of 64

Avoiding the dreaded #div/0 error

  1. #1
    Registered User
    Join Date
    03-11-2005
    Posts
    63

    Avoiding the dreaded #div/0 error

    Can I have advice on how to make the following formulae return a blank cell instead of a #div/0 error when the first reference cell in the formula is blank or 0?

    =E16/COUNTIF($C$29:$C$33,"M")

    in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)

    in cell F25: =SUM(J21:J24)

    Another rather annoying thing is that in cell A9 and A13 there is a 0 displayed. The formula in cell A9 is =E147 and in A13 it is E287. There is absolutely nothing in E147 or E287. I have tried everything I can think of to get A9 and A13 to remain blank instead of displaying a 0 (I may have typed something into E147 and E287 at one time to test it). Any ideas how to get rid of these zeros?

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    To check for blanks, use:
    =IF(ISBLANK(A1),"",A1)

    And to avoid div0 error,
    =IF(ISERR(E16/COUNTIF($C$29:$C$33,"M")),"",E16/COUNTIF($C$29:$C$33,"M"))
    puts a blank instead of DIV0 error

    Mangesh

  3. #3
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    Hard to match qua refernces the verbal description you give with the
    formulas you post. That said:

    =E16/COUNTIF($C$29:$C$33,"M")

    can be re-expressed to avoid #DIV/0! as

    =E16/MAX(1,COUNTIF($C$29:$C$33,"M"))

    Marie1uk wrote:
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >


  4. #4
    Registered User
    Join Date
    03-11-2005
    Posts
    63
    Thanks,

    How about these?

    =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do you make 0 values stay blank?

  5. #5
    CLR
    Guest

    RE: Avoiding the dreaded #div/0 error

    Others have answered the first part of your post.

    As for the second part.....use one of these, replacing A1 with your cell
    addresses.

    =IF(A1=0,"",A1), or =IF(A1="","",A1)

    Vaya con Dios,
    Chuck, CABGx3




    "Marie1uk" wrote:

    >
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  6. #6
    Registered User
    Join Date
    03-11-2005
    Posts
    63
    Maybe I was unclear. This formula:

    =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this formula to return a blank instead of a 0 value?

  7. #7
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Try custom formatting the cell...

    Format > Cell > Number > Custom > Type: 0;-0;;@

    Hope this helps!

    Quote Originally Posted by Marie1uk
    Maybe I was unclear. This formula:

    =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this formula to return a blank instead of a 0 value?

  8. #8
    CLR
    Guest

    Re: Avoiding the dreaded #div/0 error

    =IF(COUNTIF($H$42:$H$76,"A~*")=0,"",COUNTIF($H$42:$H$76,"A~*"))

    Vaya con Dios,
    Chuck, CABGx3



    "Marie1uk" wrote:

    >
    > Maybe I was unclear. This formula:
    >
    > =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this
    > formula to return a blank instead of a 0 value?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  9. #9
    Registered User
    Join Date
    03-11-2005
    Posts
    63
    These formulae are returning a DIV/0 error,

    =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)

    and

    =E9/COUNTA(A29:A33)

    How would I prevent them from returning a DIV/0 error plz?

  10. #10
    Registered User
    Join Date
    03-11-2005
    Posts
    63
    Any help to corrections to the above formaulae appreciated

  11. #11
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    =COUNTIF($H$42:$H$426,"A~*")/MAX(1,COUNT($J$42:$J$426))

    =E9/MAX(1,COUNTA(A29:A33))

    Marie1uk wrote:
    > These formulae are returning a DIV/0 error,
    >
    > =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > and
    >
    > =E9/COUNTA(A29:A33)
    >
    > How would I prevent them from returning a DIV/0 error plz?
    >
    >


  12. #12
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    Hard to match qua refernces the verbal description you give with the
    formulas you post. That said:

    =E16/COUNTIF($C$29:$C$33,"M")

    can be re-expressed to avoid #DIV/0! as

    =E16/MAX(1,COUNTIF($C$29:$C$33,"M"))

    Marie1uk wrote:
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >


  13. #13
    CLR
    Guest

    RE: Avoiding the dreaded #div/0 error

    Others have answered the first part of your post.

    As for the second part.....use one of these, replacing A1 with your cell
    addresses.

    =IF(A1=0,"",A1), or =IF(A1="","",A1)

    Vaya con Dios,
    Chuck, CABGx3




    "Marie1uk" wrote:

    >
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  14. #14
    CLR
    Guest

    Re: Avoiding the dreaded #div/0 error

    =IF(COUNTIF($H$42:$H$76,"A~*")=0,"",COUNTIF($H$42:$H$76,"A~*"))

    Vaya con Dios,
    Chuck, CABGx3



    "Marie1uk" wrote:

    >
    > Maybe I was unclear. This formula:
    >
    > =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this
    > formula to return a blank instead of a 0 value?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  15. #15
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    =COUNTIF($H$42:$H$426,"A~*")/MAX(1,COUNT($J$42:$J$426))

    =E9/MAX(1,COUNTA(A29:A33))

    Marie1uk wrote:
    > These formulae are returning a DIV/0 error,
    >
    > =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > and
    >
    > =E9/COUNTA(A29:A33)
    >
    > How would I prevent them from returning a DIV/0 error plz?
    >
    >


  16. #16
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    =COUNTIF($H$42:$H$426,"A~*")/MAX(1,COUNT($J$42:$J$426))

    =E9/MAX(1,COUNTA(A29:A33))

    Marie1uk wrote:
    > These formulae are returning a DIV/0 error,
    >
    > =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > and
    >
    > =E9/COUNTA(A29:A33)
    >
    > How would I prevent them from returning a DIV/0 error plz?
    >
    >


  17. #17
    CLR
    Guest

    Re: Avoiding the dreaded #div/0 error

    =IF(COUNTIF($H$42:$H$76,"A~*")=0,"",COUNTIF($H$42:$H$76,"A~*"))

    Vaya con Dios,
    Chuck, CABGx3



    "Marie1uk" wrote:

    >
    > Maybe I was unclear. This formula:
    >
    > =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this
    > formula to return a blank instead of a 0 value?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  18. #18
    CLR
    Guest

    RE: Avoiding the dreaded #div/0 error

    Others have answered the first part of your post.

    As for the second part.....use one of these, replacing A1 with your cell
    addresses.

    =IF(A1=0,"",A1), or =IF(A1="","",A1)

    Vaya con Dios,
    Chuck, CABGx3




    "Marie1uk" wrote:

    >
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  19. #19
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    Hard to match qua refernces the verbal description you give with the
    formulas you post. That said:

    =E16/COUNTIF($C$29:$C$33,"M")

    can be re-expressed to avoid #DIV/0! as

    =E16/MAX(1,COUNTIF($C$29:$C$33,"M"))

    Marie1uk wrote:
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >


  20. #20
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    Hard to match qua refernces the verbal description you give with the
    formulas you post. That said:

    =E16/COUNTIF($C$29:$C$33,"M")

    can be re-expressed to avoid #DIV/0! as

    =E16/MAX(1,COUNTIF($C$29:$C$33,"M"))

    Marie1uk wrote:
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >


  21. #21
    CLR
    Guest

    RE: Avoiding the dreaded #div/0 error

    Others have answered the first part of your post.

    As for the second part.....use one of these, replacing A1 with your cell
    addresses.

    =IF(A1=0,"",A1), or =IF(A1="","",A1)

    Vaya con Dios,
    Chuck, CABGx3




    "Marie1uk" wrote:

    >
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  22. #22
    CLR
    Guest

    Re: Avoiding the dreaded #div/0 error

    =IF(COUNTIF($H$42:$H$76,"A~*")=0,"",COUNTIF($H$42:$H$76,"A~*"))

    Vaya con Dios,
    Chuck, CABGx3



    "Marie1uk" wrote:

    >
    > Maybe I was unclear. This formula:
    >
    > =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this
    > formula to return a blank instead of a 0 value?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  23. #23
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    =COUNTIF($H$42:$H$426,"A~*")/MAX(1,COUNT($J$42:$J$426))

    =E9/MAX(1,COUNTA(A29:A33))

    Marie1uk wrote:
    > These formulae are returning a DIV/0 error,
    >
    > =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > and
    >
    > =E9/COUNTA(A29:A33)
    >
    > How would I prevent them from returning a DIV/0 error plz?
    >
    >


  24. #24
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    =COUNTIF($H$42:$H$426,"A~*")/MAX(1,COUNT($J$42:$J$426))

    =E9/MAX(1,COUNTA(A29:A33))

    Marie1uk wrote:
    > These formulae are returning a DIV/0 error,
    >
    > =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > and
    >
    > =E9/COUNTA(A29:A33)
    >
    > How would I prevent them from returning a DIV/0 error plz?
    >
    >


  25. #25
    CLR
    Guest

    Re: Avoiding the dreaded #div/0 error

    =IF(COUNTIF($H$42:$H$76,"A~*")=0,"",COUNTIF($H$42:$H$76,"A~*"))

    Vaya con Dios,
    Chuck, CABGx3



    "Marie1uk" wrote:

    >
    > Maybe I was unclear. This formula:
    >
    > =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this
    > formula to return a blank instead of a 0 value?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  26. #26
    CLR
    Guest

    RE: Avoiding the dreaded #div/0 error

    Others have answered the first part of your post.

    As for the second part.....use one of these, replacing A1 with your cell
    addresses.

    =IF(A1=0,"",A1), or =IF(A1="","",A1)

    Vaya con Dios,
    Chuck, CABGx3




    "Marie1uk" wrote:

    >
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  27. #27
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    Hard to match qua refernces the verbal description you give with the
    formulas you post. That said:

    =E16/COUNTIF($C$29:$C$33,"M")

    can be re-expressed to avoid #DIV/0! as

    =E16/MAX(1,COUNTIF($C$29:$C$33,"M"))

    Marie1uk wrote:
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >


  28. #28
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    =COUNTIF($H$42:$H$426,"A~*")/MAX(1,COUNT($J$42:$J$426))

    =E9/MAX(1,COUNTA(A29:A33))

    Marie1uk wrote:
    > These formulae are returning a DIV/0 error,
    >
    > =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > and
    >
    > =E9/COUNTA(A29:A33)
    >
    > How would I prevent them from returning a DIV/0 error plz?
    >
    >


  29. #29
    CLR
    Guest

    Re: Avoiding the dreaded #div/0 error

    =IF(COUNTIF($H$42:$H$76,"A~*")=0,"",COUNTIF($H$42:$H$76,"A~*"))

    Vaya con Dios,
    Chuck, CABGx3



    "Marie1uk" wrote:

    >
    > Maybe I was unclear. This formula:
    >
    > =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this
    > formula to return a blank instead of a 0 value?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  30. #30
    CLR
    Guest

    RE: Avoiding the dreaded #div/0 error

    Others have answered the first part of your post.

    As for the second part.....use one of these, replacing A1 with your cell
    addresses.

    =IF(A1=0,"",A1), or =IF(A1="","",A1)

    Vaya con Dios,
    Chuck, CABGx3




    "Marie1uk" wrote:

    >
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  31. #31
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    Hard to match qua refernces the verbal description you give with the
    formulas you post. That said:

    =E16/COUNTIF($C$29:$C$33,"M")

    can be re-expressed to avoid #DIV/0! as

    =E16/MAX(1,COUNTIF($C$29:$C$33,"M"))

    Marie1uk wrote:
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >


  32. #32
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    =COUNTIF($H$42:$H$426,"A~*")/MAX(1,COUNT($J$42:$J$426))

    =E9/MAX(1,COUNTA(A29:A33))

    Marie1uk wrote:
    > These formulae are returning a DIV/0 error,
    >
    > =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > and
    >
    > =E9/COUNTA(A29:A33)
    >
    > How would I prevent them from returning a DIV/0 error plz?
    >
    >


  33. #33
    CLR
    Guest

    Re: Avoiding the dreaded #div/0 error

    =IF(COUNTIF($H$42:$H$76,"A~*")=0,"",COUNTIF($H$42:$H$76,"A~*"))

    Vaya con Dios,
    Chuck, CABGx3



    "Marie1uk" wrote:

    >
    > Maybe I was unclear. This formula:
    >
    > =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this
    > formula to return a blank instead of a 0 value?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  34. #34
    CLR
    Guest

    RE: Avoiding the dreaded #div/0 error

    Others have answered the first part of your post.

    As for the second part.....use one of these, replacing A1 with your cell
    addresses.

    =IF(A1=0,"",A1), or =IF(A1="","",A1)

    Vaya con Dios,
    Chuck, CABGx3




    "Marie1uk" wrote:

    >
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  35. #35
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    Hard to match qua refernces the verbal description you give with the
    formulas you post. That said:

    =E16/COUNTIF($C$29:$C$33,"M")

    can be re-expressed to avoid #DIV/0! as

    =E16/MAX(1,COUNTIF($C$29:$C$33,"M"))

    Marie1uk wrote:
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >


  36. #36
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    Hard to match qua refernces the verbal description you give with the
    formulas you post. That said:

    =E16/COUNTIF($C$29:$C$33,"M")

    can be re-expressed to avoid #DIV/0! as

    =E16/MAX(1,COUNTIF($C$29:$C$33,"M"))

    Marie1uk wrote:
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >


  37. #37
    CLR
    Guest

    RE: Avoiding the dreaded #div/0 error

    Others have answered the first part of your post.

    As for the second part.....use one of these, replacing A1 with your cell
    addresses.

    =IF(A1=0,"",A1), or =IF(A1="","",A1)

    Vaya con Dios,
    Chuck, CABGx3




    "Marie1uk" wrote:

    >
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  38. #38
    CLR
    Guest

    Re: Avoiding the dreaded #div/0 error

    =IF(COUNTIF($H$42:$H$76,"A~*")=0,"",COUNTIF($H$42:$H$76,"A~*"))

    Vaya con Dios,
    Chuck, CABGx3



    "Marie1uk" wrote:

    >
    > Maybe I was unclear. This formula:
    >
    > =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this
    > formula to return a blank instead of a 0 value?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  39. #39
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    =COUNTIF($H$42:$H$426,"A~*")/MAX(1,COUNT($J$42:$J$426))

    =E9/MAX(1,COUNTA(A29:A33))

    Marie1uk wrote:
    > These formulae are returning a DIV/0 error,
    >
    > =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > and
    >
    > =E9/COUNTA(A29:A33)
    >
    > How would I prevent them from returning a DIV/0 error plz?
    >
    >


  40. #40
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    =COUNTIF($H$42:$H$426,"A~*")/MAX(1,COUNT($J$42:$J$426))

    =E9/MAX(1,COUNTA(A29:A33))

    Marie1uk wrote:
    > These formulae are returning a DIV/0 error,
    >
    > =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > and
    >
    > =E9/COUNTA(A29:A33)
    >
    > How would I prevent them from returning a DIV/0 error plz?
    >
    >


  41. #41
    CLR
    Guest

    Re: Avoiding the dreaded #div/0 error

    =IF(COUNTIF($H$42:$H$76,"A~*")=0,"",COUNTIF($H$42:$H$76,"A~*"))

    Vaya con Dios,
    Chuck, CABGx3



    "Marie1uk" wrote:

    >
    > Maybe I was unclear. This formula:
    >
    > =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this
    > formula to return a blank instead of a 0 value?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  42. #42
    CLR
    Guest

    RE: Avoiding the dreaded #div/0 error

    Others have answered the first part of your post.

    As for the second part.....use one of these, replacing A1 with your cell
    addresses.

    =IF(A1=0,"",A1), or =IF(A1="","",A1)

    Vaya con Dios,
    Chuck, CABGx3




    "Marie1uk" wrote:

    >
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  43. #43
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    Hard to match qua refernces the verbal description you give with the
    formulas you post. That said:

    =E16/COUNTIF($C$29:$C$33,"M")

    can be re-expressed to avoid #DIV/0! as

    =E16/MAX(1,COUNTIF($C$29:$C$33,"M"))

    Marie1uk wrote:
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >


  44. #44
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    Hard to match qua refernces the verbal description you give with the
    formulas you post. That said:

    =E16/COUNTIF($C$29:$C$33,"M")

    can be re-expressed to avoid #DIV/0! as

    =E16/MAX(1,COUNTIF($C$29:$C$33,"M"))

    Marie1uk wrote:
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >


  45. #45
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    =COUNTIF($H$42:$H$426,"A~*")/MAX(1,COUNT($J$42:$J$426))

    =E9/MAX(1,COUNTA(A29:A33))

    Marie1uk wrote:
    > These formulae are returning a DIV/0 error,
    >
    > =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > and
    >
    > =E9/COUNTA(A29:A33)
    >
    > How would I prevent them from returning a DIV/0 error plz?
    >
    >


  46. #46
    CLR
    Guest

    RE: Avoiding the dreaded #div/0 error

    Others have answered the first part of your post.

    As for the second part.....use one of these, replacing A1 with your cell
    addresses.

    =IF(A1=0,"",A1), or =IF(A1="","",A1)

    Vaya con Dios,
    Chuck, CABGx3




    "Marie1uk" wrote:

    >
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  47. #47
    CLR
    Guest

    Re: Avoiding the dreaded #div/0 error

    =IF(COUNTIF($H$42:$H$76,"A~*")=0,"",COUNTIF($H$42:$H$76,"A~*"))

    Vaya con Dios,
    Chuck, CABGx3



    "Marie1uk" wrote:

    >
    > Maybe I was unclear. This formula:
    >
    > =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this
    > formula to return a blank instead of a 0 value?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  48. #48
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    Hard to match qua refernces the verbal description you give with the
    formulas you post. That said:

    =E16/COUNTIF($C$29:$C$33,"M")

    can be re-expressed to avoid #DIV/0! as

    =E16/MAX(1,COUNTIF($C$29:$C$33,"M"))

    Marie1uk wrote:
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >


  49. #49
    CLR
    Guest

    RE: Avoiding the dreaded #div/0 error

    Others have answered the first part of your post.

    As for the second part.....use one of these, replacing A1 with your cell
    addresses.

    =IF(A1=0,"",A1), or =IF(A1="","",A1)

    Vaya con Dios,
    Chuck, CABGx3




    "Marie1uk" wrote:

    >
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  50. #50
    CLR
    Guest

    Re: Avoiding the dreaded #div/0 error

    =IF(COUNTIF($H$42:$H$76,"A~*")=0,"",COUNTIF($H$42:$H$76,"A~*"))

    Vaya con Dios,
    Chuck, CABGx3



    "Marie1uk" wrote:

    >
    > Maybe I was unclear. This formula:
    >
    > =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this
    > formula to return a blank instead of a 0 value?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  51. #51
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    =COUNTIF($H$42:$H$426,"A~*")/MAX(1,COUNT($J$42:$J$426))

    =E9/MAX(1,COUNTA(A29:A33))

    Marie1uk wrote:
    > These formulae are returning a DIV/0 error,
    >
    > =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > and
    >
    > =E9/COUNTA(A29:A33)
    >
    > How would I prevent them from returning a DIV/0 error plz?
    >
    >


  52. #52
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    =COUNTIF($H$42:$H$426,"A~*")/MAX(1,COUNT($J$42:$J$426))

    =E9/MAX(1,COUNTA(A29:A33))

    Marie1uk wrote:
    > These formulae are returning a DIV/0 error,
    >
    > =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > and
    >
    > =E9/COUNTA(A29:A33)
    >
    > How would I prevent them from returning a DIV/0 error plz?
    >
    >


  53. #53
    CLR
    Guest

    Re: Avoiding the dreaded #div/0 error

    =IF(COUNTIF($H$42:$H$76,"A~*")=0,"",COUNTIF($H$42:$H$76,"A~*"))

    Vaya con Dios,
    Chuck, CABGx3



    "Marie1uk" wrote:

    >
    > Maybe I was unclear. This formula:
    >
    > =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this
    > formula to return a blank instead of a 0 value?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  54. #54
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    Hard to match qua refernces the verbal description you give with the
    formulas you post. That said:

    =E16/COUNTIF($C$29:$C$33,"M")

    can be re-expressed to avoid #DIV/0! as

    =E16/MAX(1,COUNTIF($C$29:$C$33,"M"))

    Marie1uk wrote:
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >


  55. #55
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    =COUNTIF($H$42:$H$426,"A~*")/MAX(1,COUNT($J$42:$J$426))

    =E9/MAX(1,COUNTA(A29:A33))

    Marie1uk wrote:
    > These formulae are returning a DIV/0 error,
    >
    > =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > and
    >
    > =E9/COUNTA(A29:A33)
    >
    > How would I prevent them from returning a DIV/0 error plz?
    >
    >


  56. #56
    CLR
    Guest

    RE: Avoiding the dreaded #div/0 error

    Others have answered the first part of your post.

    As for the second part.....use one of these, replacing A1 with your cell
    addresses.

    =IF(A1=0,"",A1), or =IF(A1="","",A1)

    Vaya con Dios,
    Chuck, CABGx3




    "Marie1uk" wrote:

    >
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  57. #57
    CLR
    Guest

    Re: Avoiding the dreaded #div/0 error

    =IF(COUNTIF($H$42:$H$76,"A~*")=0,"",COUNTIF($H$42:$H$76,"A~*"))

    Vaya con Dios,
    Chuck, CABGx3



    "Marie1uk" wrote:

    >
    > Maybe I was unclear. This formula:
    >
    > =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this
    > formula to return a blank instead of a 0 value?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  58. #58
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    Hard to match qua refernces the verbal description you give with the
    formulas you post. That said:

    =E16/COUNTIF($C$29:$C$33,"M")

    can be re-expressed to avoid #DIV/0! as

    =E16/MAX(1,COUNTIF($C$29:$C$33,"M"))

    Marie1uk wrote:
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >


  59. #59
    Aladin Akyurek
    Guest

    Re: Avoiding the dreaded #div/0 error

    =COUNTIF($H$42:$H$426,"A~*")/MAX(1,COUNT($J$42:$J$426))

    =E9/MAX(1,COUNTA(A29:A33))

    Marie1uk wrote:
    > These formulae are returning a DIV/0 error,
    >
    > =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > and
    >
    > =E9/COUNTA(A29:A33)
    >
    > How would I prevent them from returning a DIV/0 error plz?
    >
    >


  60. #60
    CLR
    Guest

    Re: Avoiding the dreaded #div/0 error

    =IF(COUNTIF($H$42:$H$76,"A~*")=0,"",COUNTIF($H$42:$H$76,"A~*"))

    Vaya con Dios,
    Chuck, CABGx3



    "Marie1uk" wrote:

    >
    > Maybe I was unclear. This formula:
    >
    > =COUNTIF($H$42:$H$76,"A~*") returns a value of 0 - how do I modify this
    > formula to return a blank instead of a 0 value?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  61. #61
    CLR
    Guest

    RE: Avoiding the dreaded #div/0 error

    Others have answered the first part of your post.

    As for the second part.....use one of these, replacing A1 with your cell
    addresses.

    =IF(A1=0,"",A1), or =IF(A1="","",A1)

    Vaya con Dios,
    Chuck, CABGx3




    "Marie1uk" wrote:

    >
    > Can I have advice on how to make the following formulae return a blank
    > cell instead of a #div/0 error when the first reference cell in the
    > formula is blank or 0?
    >
    > =E16/COUNTIF($C$29:$C$33,"M")
    >
    > in cell J21: =COUNTIF($H$42:$H$426,"A~*")/COUNT($J$42:$J$426)
    >
    > in cell F25: =SUM(J21:J24)
    >
    > Another rather annoying thing is that in cell A9 and A13 there is a 0
    > displayed. The formula in cell A9 is =E147 and in A13 it is E287. There
    > is absolutely nothing in E147 or E287. I have tried everything I can
    > think of to get A9 and A13 to remain blank instead of displaying a 0 (I
    > may have typed something into E147 and E287 at one time to test it). Any
    > ideas how to get rid of these zeros?
    >
    >
    > --
    > Marie1uk
    > ------------------------------------------------------------------------
    > Marie1uk's Profile: http://www.excelforum.com/member.php...o&userid=20984
    > View this thread: http://www.excelforum.com/showthread...hreadid=388599
    >
    >


  62. #62
    Registered User
    Join Date
    03-13-2012
    Location
    Hackensack, NJ
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Avoiding the dreaded #div/0 error

    I'm having a similar issue with this dreaded #DIV/0! ...
    I would like it to return a 0 or a blank if no value's are inputted... The formula I have is =(COUNTIF(MAR!$G$7:$G$35,"Y")/COUNTIF(MAR!$G$7:$G$35,"*")*100)

    Thanks for your help...

  63. #63
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474

    Re: Avoiding the dreaded #div/0 error

    Since you're using Excel 2007, you can use IFERROR...

    =IFERROR((COUNTIF(MAR!$G$7:$G$35,"Y")/COUNTIF(MAR!$G$7:$G$35,"*")*100),"")

  64. #64
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,659

    Re: Avoiding the dreaded #div/0 error

    @Jptharocker: This thread is seven years old.
    Forum rule #2: Don't post a question in the thread of another member -- start your own. If you feel it's particularly relevant, provide a link to the other thread.
    Ben Van Johnson

+ 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