+ Reply to Thread
Results 1 to 7 of 7

hide #DIV/0 errors with conditional formatting

  1. #1
    Registered User
    Join Date
    06-30-2014
    Location
    Denver, Colorado
    MS-Off Ver
    Microsoft 2013
    Posts
    35

    hide #DIV/0 errors with conditional formatting

    Hello,

    I am producing a master datasheet that is linked to several other spreadsheets. I have a bunch of #DIV/0 errors that I need to hide. I know I can use the =IFERROR formula, but I was hoping to use conditional formatting to apply it to my whole worksheet, if not workbook. I've done it before, but I can't remember! It's something like formatting cells with errors and typing ;;; into the custom field?

    Unfortunately, due to my company's ridiculously strict IT dept, I can't attach my workbook or an example. I've been in trouble before for doing that Hopefully my explanation leads you in the right direction.

    Thank you so much everyone!

    hwishman

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,460

    Re: hide #DIV/0 errors with conditional formatting

    I'm not sure exactly how the dialogs are arranged in 2013. In 2007 I can select Home -> Conditional formatting -> New rule -> Format only cells that contain -> Cells with -> Errors -> Set format rule -> Font color same as background color (white on white in my case).

    Like the IFERROR() function, that will apply to all errors, not just Div/0 errors. If you are satisfied with a solution that hides all errors, then that should work.

    If you want to hide only Div/0 errors and allow the other errors to be visible, then use a formula as your conditional format rule, and use the ERROR.TYPE() function https://support.office.com/en-us/art...rs=en-US&ad=US
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    06-30-2014
    Location
    Denver, Colorado
    MS-Off Ver
    Microsoft 2013
    Posts
    35

    Re: hide #DIV/0 errors with conditional formatting

    Thank you so much for replying! The DIV/0's participate in a greater sum formula, so I need replace them with "" like I would in an =IFERROR formula. Hope that makes sense.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,750

    Re: hide #DIV/0 errors with conditional formatting

    The DIV/0's participate in a greater sum formula, so I need replace them with ""
    Would "wrapping" the references or calculations that return DIV/0's in the ISNUMBER function help that part of the problem? Summing 0s would return the same as summing the ""s. Then MrShorty's solution could still work.
    Last edited by FlameRetired; 02-09-2017 at 08:46 PM.
    Dave

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,460

    Re: hide #DIV/0 errors with conditional formatting

    Conditional formatting does not change the underlying value of a cell. If a cell formula results in an error, then that is the cell's value, and most if not all of excel's functions, if they refer to a cell with an error, will propagate that error. Formatting will not change that.

    If the errors are causing a problem in downstream calculations, then you need to use some kind of error trapping to cause the function to return something other than the error. Standard 1st answer is to use the IFERROR() function like you initially described. If you want errors to be treated as 0 in another sum, then something like =IFERROR(current formula,0) (or "" or other text when using the downstream function is a SUM() function that ignores text. Of course, there are other options, depending on exactly how you want to trap the error. Since you already seem familiar with at least the IFERROR() function, I will assume you can do the error trapping you need. Conditional formatting or other formatting options are not going to do this kind of error trapping.

  6. #6
    Registered User
    Join Date
    06-30-2014
    Location
    Denver, Colorado
    MS-Off Ver
    Microsoft 2013
    Posts
    35

    Re: hide #DIV/0 errors with conditional formatting

    So there's no way to apply something like an =IFERROR formula to multiple cells containing the DIV/0 error without using VBA? I'd have to assign the =IFERROR formula individually to 100+ separate cells?

    Thanks

  7. #7
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,460

    Re: hide #DIV/0 errors with conditional formatting

    I don't think any of us has suggested that there is no way to do this, we just don't have enough context to understand exactly what you need done here.

    If your current formula is easily copied, it might be as easy as editing the first instance of the formula to wrap the IFERROR() around the current formula, then copy and paste into the other instances of that formula.

    You indicated that these errors are interfering with another SUM() function. Something like =SUM(IFERROR(A4:A44,0)) entered as an array function (ctrl-shift-enter) will trap the errors inside of the sum function and replace them with 0's before performing the sum.

    If you can provide more details about the changes that need to be made (perhaps upload a copy of your current spreadsheet with dummy data, if needed), then we will be able to see how the error and error trapping fits into the overall spreadsheet and make better recommendations from there.

+ 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. [SOLVED] Reuire Conditional Formatting to find Errors between columns
    By Kmartin83 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 01-20-2014, 10:40 AM
  2. Conditional Formatting Logic Errors
    By traftacana in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-04-2013, 02:02 PM
  3. Conditional Formatting Using Names Ranges - No Errors?
    By brokenbiscuits in forum Excel General
    Replies: 0
    Last Post: 06-28-2012, 04:37 AM
  4. Conditional Formatting and Errors
    By Jonathan78 in forum Excel General
    Replies: 5
    Last Post: 05-29-2010, 01:40 PM
  5. Conditional Formatting w/ errors
    By nesthead98 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2009, 03:56 PM
  6. hide errors using iserror and conditional formatting
    By jcavigli in forum Excel General
    Replies: 4
    Last Post: 07-06-2008, 12:15 AM
  7. Conditional Formatting for errors
    By Zyphon in forum Excel General
    Replies: 3
    Last Post: 09-25-2007, 05:59 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