+ Reply to Thread
Results 1 to 6 of 6

Hide #Value! when error

Hybrid View

AmazingTrans Hide #Value! when error 03-23-2009, 02:48 AM
AmazingTrans Re: Hide #Value! when error 03-23-2009, 02:51 AM
zbor Re: Hide #Value! when error 03-23-2009, 03:02 AM
JBeaucaire Re: Hide #Value! when error 03-23-2009, 03:08 AM
DonkeyOte Re: Hide #Value! when error 03-23-2009, 03:29 AM
JBeaucaire Re: Hide #Value! when error 03-23-2009, 03:07 AM
  1. #1
    Registered User
    Join Date
    03-23-2009
    Location
    usa
    MS-Off Ver
    Excel 2003, 2013
    Posts
    16

    Hide #Value! when error

    Hi there,
    I have a sheet with lots of VLOOKUP. When the VLOOKUP cannot find the specific items, my cells will display #VALUE!. and this will be shown even when I print.
    I am wondering if there is any options that I can check off, or do not check error so that the #VALUE! do not display? Of course I am looking for another options other than adding If statements in front of the formula.

    I have tried conditioning format, if formula = ISERROR(#VALUE!) cell will be white. But this will affect cells that have just normal text as well.

    Any opinions?

    I really hope someone can help me with this.

  2. #2
    Registered User
    Join Date
    03-23-2009
    Location
    usa
    MS-Off Ver
    Excel 2003, 2013
    Posts
    16

    Re: Hide #Value! when error

    OR is there anyway instead of displaying #VALUE!, it will display a dash? I remember I use to do this 10 years ago, but now i don't remember anymore.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,053

    Re: Hide #Value! when error

    How about this..
    =IFERROR(VLOOKUP(A13;C4:D9;2;FALSE);"-")
    Last edited by zbor; 03-23-2009 at 03:16 AM. Reason: -
    Never use Merged Cells in Excel

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Hide #Value! when error

    Quote Originally Posted by zbor View Post
    How about this..
    =IFERROR(VLOOKUP(A13;C4:D9;2;FALSE);"")
    The OP is using Excel 2003. Watch for that when suggesting using functions only native to 2007.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Hide #Value! when error

    I think the OP in the initial thread stipulates that they are looking for methods other than amending the formulae:

    Of course I am looking for another options other than adding If statements in front of the formula
    in which case as OP states Conditional Formatting would work:

    =ISERROR(cell reference)
    formatted to white

    This will not affect non-error cells, however, be warned however that CF is Volatile... altering the underlying formulae would be preferable on this basis - and using native formulae would be preferable to UDF.

    The fact you're getting a #VALUE! error would also imply to me that the issue is not that the VLOOKUP can not find the result rather it is that the result of the VLOOKUP is non-numeric and you're are attempting some subsequent numeric coercion, can you post your formula ?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Hide #Value! when error

    Simplest way is to wrap your existing VLOOKUP formula in an ISERROR test, but that means for it to bring back a value, every single one of those formulas has to be run TWICE...ugh. It looks like this for example:

    =IF(ISERROR(VLOOKUP(A1,B1:C10,2,FALSE)),"-",VLOOKUP(A1,B1:C10,2,FALSE))

    If you don't mind that, then just use that technique.

    If you're using other macros in your sheet and/or you don't mind adding a new function into your sheet, there is a simpler formula, but the end result will be exactly the same. Using it would mean macros would have to be active which is why I mentioned it.

    To do this:
    Press Alt-F11 to open the VBEditor
    Click on Insert > Module to open a standard module window
    Paste in this code:
    Function IFERROR(ToEvaluate As Variant, Default As Variant) As Variant
        If IsArray(ToEvaluate) Then
            IFERROR = IIf(IsError(ToEvaluate(1)), Default, ToEvaluate)
        Else
            IFERROR = IIf(IsError(ToEvaluate), Default, ToEvaluate)
        End If
    End Function
    Press Alt-F11 to close the editor
    Save your sheet.

    Now you can use a simple "once through" formula like this;

    =IFERROR(VLOOKUP(A1,B1:C10,2,FALSE),"-")

+ 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