+ Reply to Thread
Results 1 to 7 of 7

Getting #N/A on a nested multi IF(ISNA statement

  1. #1
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Getting #N/A on a nested multi IF(ISNA statement

    Hi everyone,

    I have the following formula:

    Please Login or Register  to view this content.
    This formula is copied down about 20 times and the only item that changes is the "-03" number (goes from 1 - 20). For some reasons, I'm getting a #N/A on random rows. So In this case, I get a #N/A for "-03" but on none of the other numbers. In fact, this is the only one that doesn't become blank if the figure does not appear in the data sheet. Any ideas what I'm doing wrong?

    Thanks guys!

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Getting #N/A on a nested multi IF(ISNA statement

    You need to reverse the vlookups in the "Value if False" parts of each if..
    Perhaps some color coding will help.

    =IF(ISNA(VLOOKUP($A$16&"-03",'Data Month 1'!W:W,1,0)),IF(ISNA(VLOOKUP($A$16&"-03",'Data Month 2'!W:W,1,0)),IF(ISNA(VLOOKUP($A$16&"-03",'Data Month 3'!W:W,1,0)),IF(ISNA(VLOOKUP($A$16&"-03",'Data Month 4'!W:W,1,0)),"",VLOOKUP($A$16&"-03",'Data Month 1'!W:W,1,0)),VLOOKUP($A$16&"-03",'Data Month 2'!W:W,1,0)),VLOOKUP($A$16&"-03",'Data Month 3'!W:W,1,0)),VLOOKUP($A$16&"-03",'Data Month 4'!W:W,1,0))

    The RED Vlookup is the "Value if False" for the RED IF(ISNA
    The BLUE Vlookup is the "Value if False" for the BLUE IF(ISNA
    The GREEN Vlookup is the "Value if False" for the GREEN IF(ISNA
    The ORANGE Vlookup is the "Value if False" for the ORANGE IF(ISNA

    So say the first 3 vlookups are NA
    But the 4th one is NOT NA, it then proceeds to execute the RED Vlookup (which is different from the one that was tested by the Red IF(ISNA)

    Hope that helps.

  3. #3
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Getting #N/A on a nested multi IF(ISNA statement

    Hi Jonmo,

    Thanks for the reply. I'm sorry I don't quite understand what you're saying. What do you mean by reverse the "value if false" parts? ALso, I'm not sure I understand your colour coding considering the contents of each vlookup. Could you clarify?

    Thanks again for your reply

  4. #4
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Getting #N/A on a nested multi IF(ISNA statement

    The value if false is referring to if the ISNA is false, is ISnotNA. It is just a copy of the lookup within the ISNA function.
    Despite the high cost of living, it remains very popular.

    Don't forget to mark threads SOLVED when you get an answer and rep all the geniouses that helped you today!

  5. #5
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Getting #N/A on a nested multi IF(ISNA statement

    Actually I think I might have worked it out. thanks Jonmo

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Getting #N/A on a nested multi IF(ISNA statement

    The basic IF has 3 parts
    Expression
    ValueIfTrue
    ValueIfFalse
    =IF(Expression,ValueIfTrue,ValueIfFalse)

    When you NEST if's, a 2nd IF takes the place of either the ValueIfTrue or the ValueIfFalse part
    You have them in the ValueIfTrue parts..

    But each IF still has it's own ValueIfTrue AND ValueIfFalse parts.
    And they go like this
    =IF(Expression1,IF(Expression2,valueif2istrue,valueif2isfalse),valueif1isfalse)
    The 2nd IF was put in the place of the ValueIfTrue for The first IF
    Notice how the ValueIFFalse parts Descend 2 to 1 from left to right.
    The RED valueif1isfalse executes if the RED Expression1 is FALSE
    The BLUE valueif2isfalse executes if the BLUE Expression2 is FALSE

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Getting #N/A on a nested multi IF(ISNA statement

    Glad to help.

    Now after taking a closer look, using a 1 column Vlookup
    VLOOKUP($A$16&"-03",'Data Month 1'!W:W,1,0)

    That just returns the same value that is being looked up (if it's there).

    So essentially you're just verifying the value exists in one of the 4 sheets, right?
    This might be a simpler method

    =IF(OR(COUNTIF('Data Month 1'!W:W,$A$16&"-03"),COUNTIF('Data Month 2'!W:W,$A$16&"-03"),COUNTIF('Data Month 3'!W:W,$A$16&"-03"),COUNTIF('Data Month 4'!W:W,$A$16&"-03")),$A$16&"-03","")

+ 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. Nested If Statement - ISNA issue
    By Bearack in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-06-2013, 11:44 AM
  2. [SOLVED] Need help with a nested IF with an ISNA (I think)
    By nighthalcyon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-25-2013, 05:13 PM
  3. [SOLVED] Nested If Statement - ISBLANK and ISNA in same statement?
    By Janc in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-23-2013, 09:00 AM
  4. Excel 2007 : Nested IF, AND IF, ISNA IF.. Arghhh
    By myvlturbo in forum Excel General
    Replies: 3
    Last Post: 06-26-2010, 12:00 AM
  5. nested if statment - needs if(isna
    By techiemom60 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-27-2006, 03:00 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