+ Reply to Thread
Results 1 to 4 of 4

Replace Error with a Dash

Hybrid View

  1. #1
    Karen
    Guest

    Replace Error with a Dash

    I have a cell with the following formula:
    {=AVERAGE(IF(B4:M4<>0,B4:M4))}
    It's producing the infamous #DIV/0! error - When the cell produces this
    error, I just want a dash in its place. How can this be done?

    Thank you

  2. #2
    Gizmo63
    Guest

    RE: Replace Error with a Dash

    Wrap it all in an if and test for an error:
    =if(iserror(AVERAGE(IF(B4:M4<>0,B4:M4))),"-",AVERAGE(IF(B4:M4<>0,B4:M4)))

    Note: when using "-" keep in mind other formulas referring to this cell. If
    you're doing a calculation then a "-" will produce an error.
    You may be better setting the error value to 0 (zero) and using the
    formatting to show a dash.

    HTH

    Giz

    "Karen" wrote:

    > I have a cell with the following formula:
    > {=AVERAGE(IF(B4:M4<>0,B4:M4))}
    > It's producing the infamous #DIV/0! error - When the cell produces this
    > error, I just want a dash in its place. How can this be done?
    >
    > Thank you


  3. #3
    Karen
    Guest

    RE: Replace Error with a Dash

    Thank you for your help - I used this formula on a cell that should not
    produce a zero, it should average the numbers and I'm getting a dash. Do you
    know what is wrong?
    Thank you

    "Gizmo63" wrote:

    > Wrap it all in an if and test for an error:
    > =if(iserror(AVERAGE(IF(B4:M4<>0,B4:M4))),"-",AVERAGE(IF(B4:M4<>0,B4:M4)))
    >
    > Note: when using "-" keep in mind other formulas referring to this cell. If
    > you're doing a calculation then a "-" will produce an error.
    > You may be better setting the error value to 0 (zero) and using the
    > formatting to show a dash.
    >
    > HTH
    >
    > Giz
    >
    > "Karen" wrote:
    >
    > > I have a cell with the following formula:
    > > {=AVERAGE(IF(B4:M4<>0,B4:M4))}
    > > It's producing the infamous #DIV/0! error - When the cell produces this
    > > error, I just want a dash in its place. How can this be done?
    > >
    > > Thank you


  4. #4
    Karen
    Guest

    RE: Replace Error with a Dash

    Thank you - It works great!
    It wasn't working before because I didn't Ctrl + Shift + Enter
    Thanks again

    "Gizmo63" wrote:

    > Wrap it all in an if and test for an error:
    > =if(iserror(AVERAGE(IF(B4:M4<>0,B4:M4))),"-",AVERAGE(IF(B4:M4<>0,B4:M4)))
    >
    > Note: when using "-" keep in mind other formulas referring to this cell. If
    > you're doing a calculation then a "-" will produce an error.
    > You may be better setting the error value to 0 (zero) and using the
    > formatting to show a dash.
    >
    > HTH
    >
    > Giz
    >
    > "Karen" wrote:
    >
    > > I have a cell with the following formula:
    > > {=AVERAGE(IF(B4:M4<>0,B4:M4))}
    > > It's producing the infamous #DIV/0! error - When the cell produces this
    > > error, I just want a dash in its place. How can this be done?
    > >
    > > Thank you


+ 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