+ Reply to Thread
Results 1 to 7 of 7

Replacing zero values with dashes

  1. #1
    Registered User
    Join Date
    12-01-2004
    Location
    Westland, New Zealand
    Posts
    57

    Replacing zero values with dashes

    I have a formula in a cell which is calculating from several cells. When the value comes out at zero, I want a dash to display, not zeros. I have read the tip on this subject, and tried it, but it does not work! I have used the following syntax:

    #,##0.00;[Red](#,##0.00);- ;

    This should do the following:

    1. When the result is positive, the display should have two decimal places with a thousands separator.
    2. When the results is negative, the display should have all the above, but be red and have brackets around it.
    3. When the result is zero, only a dash should be visible.

    When my formula has a zero result, it shows "0.00" or "(0.00)"! Can anybody tell me why??

    Jonathan

  2. #2
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479
    Quote Originally Posted by Jonibenj
    I have a formula in a cell which is calculating from several cells. When the value comes out at zero, I want a dash to display, not zeros. I have read the tip on this subject, and tried it, but it does not work! I have used the following syntax:

    #,##0.00;[Red](#,##0.00);- ;

    This should do the following:

    1. When the result is positive, the display should have two decimal places with a thousands separator.
    2. When the results is negative, the display should have all the above, but be red and have brackets around it.
    3. When the result is zero, only a dash should be visible.

    When my formula has a zero result, it shows "0.00" or "(0.00)"! Can anybody tell me why??

    Jonathan
    Hi Jonathan

    Try this >

    _-*#,##0.00_-;[RED]-*#,##0.00_-;_-*"-"??_-;_-@_-
    Paul

  3. #3
    NC
    Guest

    Re: Replacing zero values with dashes

    Hi

    Rather than changing the display format you can change the o/p
    itself...

    this can be done by using following formula

    =if( yourformula=0,"-",yourformula)

    this means when the answer is 0 it will return dash otherwise the
    result.

    added to this you can also keep the formatting
    #,##0.00;[Red](#,##0.00) so that negative values would be shown as red

    Regards
    NC


  4. #4
    Sandy Mann
    Guest

    Re: Replacing zero values with dashes

    Picky point:- XL Help suggests

    #,##0.00_);[Red](#,##0.00) so that the positive numbers line up with the
    negative numbers.

    Incidentally a custom format of

    #,###.00;[Red] (#,###.00);-;@

    works for me in XL97
    --
    Regards

    Sandy
    [email protected]
    Replace@mailinator with @tiscali.co.uk


    "NC" <[email protected]> wrote in message
    news:[email protected]...
    > Hi
    >
    > Rather than changing the display format you can change the o/p
    > itself...
    >
    > this can be done by using following formula
    >
    > =if( yourformula=0,"-",yourformula)
    >
    > this means when the answer is 0 it will return dash otherwise the
    > result.
    >
    > added to this you can also keep the formatting
    > #,##0.00;[Red](#,##0.00) so that negative values would be shown as red
    >
    > Regards
    > NC
    >




  5. #5
    Registered User
    Join Date
    12-01-2004
    Location
    Westland, New Zealand
    Posts
    57
    Hi Paul,

    Sorry, but Excel will not accept this format - it tells me to use one of the custom formats!

    Jonathan

  6. #6
    Registered User
    Join Date
    12-01-2004
    Location
    Westland, New Zealand
    Posts
    57
    Dear NC,

    This looked like a good option, however, it didn't work! I still got a result of 0.00!
    Unbelievable, eh?!! Any more ideas?

    Jonathan

  7. #7
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479
    Quote Originally Posted by Jonibenj
    Hi Paul,

    Sorry, but Excel will not accept this format - it tells me to use one of the custom formats!

    Jonathan
    Hi Jonathan

    I'm using excel 2000 and that is one of the custom functions, scroll down the list it's either third from bottom or bottom of the list, can't remember which

+ 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