Consulting

Results 1 to 17 of 17

Thread: Solved: Not displaying N/A but showing a blank ""

  1. #1

    Solved: Not displaying N/A but showing a blank ""

    Is there a way not to show the term " #N/A" ? Instead I would wish to display a blank cell.

    Thanks

  2. #2
    VBAX Regular
    Joined
    Dec 2006
    Posts
    21
    Location
    Hi,

    I have also problem with this but have you tried putting "" instread of for instance, 0 in a the condition. If you do this than the cell should show blank rather than #N/A.
    For example rather than this
    =IF(D17>F17,0,D17

    Try this

    =IF(D17>F17,"",D17

    Not sure if this helps but hope so.

    Rgs
    C

  3. #3
    VBAX Contributor moa's Avatar
    Joined
    Nov 2006
    Posts
    177
    Location
    I use this to test if the fields I am referencing are giving errors:

    =IF(OR(ISNA(J19),ISNA(J31)),"",J19+J31)
    Glen

  4. #4
    Administrator
    Chat VP
    VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    Check out the ISERROR function, e.g. =IF(ISERROR(AVERAGE(A1:A4)),"",AVERAGE(A1:A4))
    You know you're really in trouble when the light at the end of the tunnel turns out to be the headlight of a train hurtling towards you

    The major part of getting the right answer lies in asking the right question...


    Made your code more readable, use VBA tags (this automatically inserts [vba] at the start of your code, and [/vba ] at the end of your code) | Help those helping you by marking your thread solved when it is.

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Correct the error, why ignore it?

  6. #6
    VBAX Contributor moa's Avatar
    Joined
    Nov 2006
    Posts
    177
    Location
    sometimes it not an option.
    Glen

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    For example?

  8. #8
    VBAX Contributor moa's Avatar
    Joined
    Nov 2006
    Posts
    177
    Location
    I dunno... Maybe if you are ranking suppliers and you want to exclude some who don't offer a certain option. You could force an error (if a cell = ?0 then cell with subtotal = NA()) then the final total will be #NA and all you need to do is test (isna()) and return an empty string then it is not ranked. I'm sure there are other options (which is probably what you are getting at) but it's pretty handy without being too time consuming.
    Glen

  9. #9
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    That is not a case of '... not an option ...', but a specific design decision. And a bad design decision IMO, to deliberately create an error that could mix with real errors compounds an alraedy bad problem of ignoring errors. In my experience, ignoring errors will inevitably mean that it will come back and bite you one day, when something is ignored that shouldn't have been , and a bad analysis/business decision is made.

  10. #10
    Administrator
    2nd VP-Knowledge Base VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location
    Quote Originally Posted by xld
    For example?
    User ignorance.




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

  11. #11
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by malik641
    User ignorance.
    I wouldn't have thought so, we are talking developer here not user. If some user actions causes a NA then that is a design/coding problem.

  12. #12
    Administrator
    Chat VP VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    I agree with Bob here, IMO it's always better to use data validation to exclude any errors than to ignore them (even tho that's clearly an option)
    You know you're really in trouble when the light at the end of the tunnel turns out to be the headlight of a train hurtling towards you

    The major part of getting the right answer lies in asking the right question...


    Made your code more readable, use VBA tags (this automatically inserts [vba] at the start of your code, and [/vba ] at the end of your code) | Help those helping you by marking your thread solved when it is.

  13. #13


    I've got this formula :
    =IF(ISNA(J33),"", VLOOKUP(9.99999999999999E+307,K33:K41,1))
    I want to omit the N/A is because when my reference " K33:K41" is blank, I don't wish to see the display.

    This is what i tried. But I've got this circular reference and therefore a zero instead of null.

    !

    Thanks alot.

  14. #14
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by MNJ


    I've got this formula :
    =IF(ISNA(J33),"", VLOOKUP(9.99999999999999E+307,K33:K41,1))
    I want to omit the N/A is because when my reference " K33:K41" is blank, I don't wish to see the display.

    This is what i tried. But I've got this circular reference and therefore a zero instead of null.

    !

    Thanks alot.
    The point that Johnske and I are making is that you should fix the formula in J33 so that it doesn't resolve to NA. Far better IMO to make an explicit decision there that stops an NA being created than to try ignoring it down the line.

  15. #15
    Administrator
    2nd VP-Knowledge Base VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location
    Quote Originally Posted by xld
    If some user actions causes a NA then that is a design/coding problem.
    I agree with that. When developing / designing I try to think of every possible error that could come up and the best way to avoid / solve it.




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

  16. #16
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Agreed, it is always better to take care of the error at its source rather than taking care of it down the road. This can prove difficult and involved in some cases. An excellent write-up on these circumstances can be found on a post by Aladin Akyurek at the MrExcel board: http://www.mrexcel.com/board2/viewtopic.php?t=62102

  17. #17
    Ok. Thanks. Will try.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •