+ Reply to Thread
Results 1 to 12 of 12

How to get a number show up as 0 inside a formula.

  1. #1
    Forum Contributor
    Join Date
    11-23-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2013
    Posts
    457

    How to get a number show up as 0 inside a formula.

    In my attached screenshot, I have a formula in cell T17 with an iferror pretext to prevent errors from showing up if no value is associated with that name, however, instead of returning -- like I'm telling it to it's returning a 0 value instead which I don't want. Any idea why and how I can get it to show as -- ?

    Thanks!
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: How to get a number show up as 0 inside a formula.

    It's hard to tell without the workbook to actually look through, but are you sure the data in the Player Databse from which the formula is pulling is not zero? Also, you could use Excel's formula evaluator to determine whether it is actually the IFERROR() part of your formula that is returning a zero, and not a different part:

    Hit ALT+T+U+F to open the Formula Evaluator.
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Re: How to get a number show up as 0 inside a formula.

    Seems like it would be the INDEX part of your formula returning the 0 error instead of the whole INDEX/MATCH.

  4. #4
    Forum Contributor
    Join Date
    11-23-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2013
    Posts
    457

    Re: How to get a number show up as 0 inside a formula.

    Quote Originally Posted by mcmahobt View Post
    It's hard to tell without the workbook to actually look through, but are you sure the data in the Player Databse from which the formula is pulling is not zero? Also, you could use Excel's formula evaluator to determine whether it is actually the IFERROR() part of your formula that is returning a zero, and not a different part:

    Hit ALT+T+U+F to open the Formula Evaluator.
    Yes in the player database it's blank, there isn't a value or formula or anything, just an empty cell.

  5. #5
    Forum Contributor
    Join Date
    11-23-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2013
    Posts
    457

    Re: How to get a number show up as 0 inside a formula.

    Quote Originally Posted by amphinomos View Post
    Seems like it would be the INDEX part of your formula returning the 0 error instead of the whole INDEX/MATCH.
    What would I need to adjust to make it read -- or even a blank, anything but an error or 0?

  6. #6
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    606

    Re: How to get a number show up as 0 inside a formula.

    I think your formula is resulting in 0 without an error, so maybe:-
    =IFERROR(IF(yourformulahere=0,"--",yourformulahere),"--")

    To test that it is not resulting in error, remove the iferror part of you formula and the result should still be 0
    Last edited by Beamernsw; 02-10-2015 at 09:46 AM.

  7. #7
    Forum Contributor
    Join Date
    11-23-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2013
    Posts
    457

    Re: How to get a number show up as 0 inside a formula.

    Quote Originally Posted by Beamernsw View Post
    I think what you want is "--" instead of just -- to display it as text, or just "" to leave the cell blank

    =IFERROR(yourformulahere,"--")
    Ya that's what I have already.

  8. #8
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: How to get a number show up as 0 inside a formula.

    What is the formula returning without the IFERROR() portion? Highlight your INDEX/MATCH formula and hit F9. What does that return?

  9. #9
    Forum Contributor
    Join Date
    11-23-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2013
    Posts
    457

    Re: How to get a number show up as 0 inside a formula.

    Quote Originally Posted by mcmahobt View Post
    What is the formula returning without the IFERROR() portion? Highlight your INDEX/MATCH formula and hit F9. What does that return?
    The same, a 0.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: How to get a number show up as 0 inside a formula.

    iferror(if(your formula=0,"--",your formula),"--")

    Separate the ifferror bit from the index match bit and use the above structure. You'll get an -- for zeros and for errors.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  11. #11
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: How to get a number show up as 0 inside a formula.

    Make sure that there is truly no data within your INDEXed portion of your formula then. If there was truly no match, the result of the formula should be a #N/A. Sometimes a space or an ="" can be misconstrued as an empty cell. A good way to test this is to use the ISBLNAK() or ISEMPTY() functions.

  12. #12
    Forum Contributor
    Join Date
    11-23-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2013
    Posts
    457

    Re: How to get a number show up as 0 inside a formula.

    Quote Originally Posted by Glenn Kennedy View Post
    iferror(if(your formula=0,"--",your formula),"--")

    Separate the ifferror bit from the index match bit and use the above structure. You'll get an -- for zeros and for errors.
    I keep getting too many errors for this function when trying this, any chance you could type it out for me so I can paste it in how it should look? Thanks!

+ 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] Formula/Macro to list down the dates that are inside a week number of a month
    By michaljireht in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-22-2014, 08:16 AM
  2. [SOLVED] Show zero in this VALUE formula instead of negative number
    By islandeeya in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-30-2014, 04:41 PM
  3. [SOLVED] show jpeg picture inside a userform image control box
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 31
    Last Post: 07-29-2013, 03:44 PM
  4. Formatting a number inside a formula
    By bopsgtir in forum Excel General
    Replies: 3
    Last Post: 10-28-2011, 09:21 AM
  5. Replies: 1
    Last Post: 07-26-2010, 01:35 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