+ Reply to Thread
Results 1 to 5 of 5

Hiding #N/A With Conditional Formatting

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    09-23-2005
    Location
    Bristol, UK
    MS-Off Ver
    2007
    Posts
    664

    Hiding #N/A With Conditional Formatting

    Hi all,

    I've got a VLOOKUP list that, if nothing is in the a cell it is looking up in returns a "#N/A" cell value. No problem there. However, I'd like to hide these values, and just keep the returned VLOOKUP values.

    I thought this would be done easiest using conditional formatting on the cells, and setting the font colour to white if the cell value was "#N/A". I tried the following condition:

    Cell Value / equal to / #N/A

    But Excel doesn't seem to like this. I've also tried the #N/A in inverted commas, and also typing #N/A in a cell (let's say A50) and doing:

    Cell Value / equal to / $A$50

    Still no joy. Can anyone suggest a means of hiding my #N/As?

    TIA,

    SamuelT

  2. #2
    Pete
    Guest

    Re: Hiding #N/A With Conditional Formatting

    One way is to change your lookup formula to detect if you get errors,
    and to return "" if this happens, i.e.

    =IF(ISNA(lookup_formula),"",lookup_formula)

    This will check for any #N/A and substitute a blank instead. You could
    use ISERROR instead of ISNA.

    Pete


  3. #3
    Stephen
    Guest

    Re: Hiding #N/A With Conditional Formatting

    "SamuelT" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi all,
    >
    > I've got a VLOOKUP list that, if nothing is in the a cell it is looking
    > up in returns a "#N/A" cell value. No problem there. However, I'd like
    > to hide these values, and just keep the returned VLOOKUP values.
    >
    > I thought this would be done easiest using conditional formatting on
    > the cells, and setting the font colour to white if the cell value was
    > "#N/A". I tried the following condition:
    >
    > Cell Value / equal to / #N/A
    >
    > But Excel doesn't seem to like this. I've also tried the #N/A in
    > inverted commas, and also typing #N/A in a cell (let's say A50) and
    > doing:
    >
    > Cell Value / equal to / $A$50
    >
    > Still no joy. Can anyone suggest a means of hiding my #N/As?
    >
    > TIA,
    >
    > SamuelT


    You can do this with conditional formatting, using the ISNA() function, but
    it's better to adapt the formula itself, like this:
    =IF(ISNA(your_formula),"",your_formula)

    For example:
    =IF(ISNA(VLOOKUP(D1,A1:B3,2,FALSE)),"",VLOOKUP(D1,A1:B3,2,FALSE))

    Stephen



  4. #4
    Danny@Kendal
    Guest

    Re: Hiding #N/A With Conditional Formatting

    "SamuelT" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi all,
    >
    > I've got a VLOOKUP list that, if nothing is in the a cell it is looking
    > up in returns a "#N/A" cell value. No problem there. However, I'd like
    > to hide these values, and just keep the returned VLOOKUP values.
    >
    > I thought this would be done easiest using conditional formatting on
    > the cells, and setting the font colour to white if the cell value was
    > "#N/A". I tried the following condition:
    >
    > Cell Value / equal to / #N/A


    If you compare one value to an error you get an error rather than
    true/false.

    Select the range of cells to which you want to apply the conditional
    formatting then use the following:
    Formula Is =ISERROR(A1)

    Replace A1 with the top-left cell in your selected range.



  5. #5
    Valued Forum Contributor
    Join Date
    09-23-2005
    Location
    Bristol, UK
    MS-Off Ver
    2007
    Posts
    664
    Thanks guys.

    Went with the last one. Works a treat!

    SamuelT

+ 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