+ Reply to Thread
Results 1 to 8 of 8

Is there a way to change the error "div/0" in data table to "--" using cond. formatting?

  1. #1
    Registered User
    Join Date
    06-22-2012
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2016
    Posts
    19

    Is there a way to change the error "div/0" in data table to "--" using cond. formatting?

    I have a data table that calculates the averages of some data by month. Some months do not have certain averages and that is why the data table calculates them as div/0. I would like to leave those months, but change div/0 to "--". Since it is a data table, i cannot change anything there. So, i was trying to use a conditional formatting formula: ISERROR(A1), special format "--", but it doesn't work. I assume it doesn't, because the custom format works with numbers only. Is there any other way to do it?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Is there a way to change the error "div/0" in data table to "--" using cond. formattin

    Why can't you change the formula within your data table?

    Pete

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Is there a way to change the error "div/0" in data table to "--" using cond. formattin

    Maybe

    =IF(ISERROR(YOUR FORMULA)),"--",YOUR FORMULA)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Is there a way to change the error "div/0" in data table to "--" using cond. formattin

    combine the Iserror with If statement.

    If(iserror(A1),"---",Value if no error)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    06-22-2012
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Is there a way to change the error "div/0" in data table to "--" using cond. formattin

    My formula to calculate a data table is to count the averages if the number of jobs are more than "0". How to add there if it is going to be an error not to calculate it?

  6. #6
    Registered User
    Join Date
    06-22-2012
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Is there a way to change the error "div/0" in data table to "--" using cond. formattin

    Quote Originally Posted by alansidman View Post
    combine the Iserror with If statement.

    If(iserror(A1),"---",Value if no error)
    It is conditional formatting formula, not the formula in a cell. In Data table i cannot add the formula to the cell

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Is there a way to change the error "div/0" in data table to "--" using cond. formattin

    Look at this as an optional solution. Scroll down.

    http://support.microsoft.com/kb/182189

  8. #8
    Registered User
    Join Date
    06-22-2012
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Is there a way to change the error "div/0" in data table to "--" using cond. formattin

    Quote Originally Posted by alansidman View Post
    Look at this as an optional solution. Scroll down.

    http://support.microsoft.com/kb/182189
    Alan, Thank you so much for your help. This is what i did and it worked to hide it. I wanted to change it to "--", but i will leave it as a blank i guess.

+ 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