+ Reply to Thread
Results 1 to 3 of 3

Replacing error values "0" with "-"

  1. #1
    Registered User
    Join Date
    09-27-2011
    Location
    providence RI
    MS-Off Ver
    Excel 2008 Mac
    Posts
    2

    Question Replacing error values "0" with "-"

    Ok I know this has to be easy but im having a real tough time making the "0" value of a formula display as "-" instead. Im using Excel 2008 on a Mac fyi.

    I have 2 tabs in my workbook,
    the first is worksheet that i use to enter my data
    the second tab has all the formulas and the end result of data im looking to print out.

    on the second tab im using formulas like " =Data!B2 " (data being the name of my worksheet tab)
    on the second tab I would like to display a "-" if there is no data present on the worksheet whereas what i have displaying now is "0"

    Excel help said to wrap the formula with =IF(ISERROR(old_formula),"-",old_formula)
    but to no avail it gives me another error saying that the formula contains an error
    I attached a copy of the workbook template for reference

    Help Please!
    Attached Files Attached Files
    Last edited by jhooker84; 09-27-2011 at 11:07 PM.

  2. #2
    Registered User
    Join Date
    05-17-2009
    Location
    Port St. Lucie, FL
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Replacing error values "0" with "-"

    jhooker84,
    This is what I did to get "-" on the second sheet.
    Worksheet - Event sheet
    Cell B5 type"=IF(DATA!B2=0,"-",DATA!B2)" without the first or last ".

    Just use the same formula on each cell changing the DATA!B2 to appropriate cell DATA!B5.
    hth
    Dennis

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Replacing error values "0" with "-"

    Hello,

    the 0 returned by the formula if the referred cell is empty is not an error, therefore an ISError will not do much good.

    You can format the cells with a custom number format that displays zero values as a - character.

    Select the cells and format with custom number format

    0;0;-;@

    for plain numbers without decimals, or

    #,##0.00;-#,##0.00;-;@

    if you want to show thousand separator and two decimals
    The syntax for custom number formats is

    positive;negative;zero;text

    cheers,

+ 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