+ Reply to Thread
Results 1 to 7 of 7

Nested If Statement - ISNA issue

  1. #1
    Registered User
    Join Date
    02-10-2012
    Location
    Denver
    MS-Off Ver
    Excel 365
    Posts
    21

    Nested If Statement - ISNA issue

    For some reason I'm drawing a blank (mental blank). Trying to resolve my #N/A issue and normally I firgure it out, but alas, I'm slightly brain dead this morning.

    Current formula: =IF(VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)<IN!$B$2,VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)+365,VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE))

    Any help would be greatly appreciated. Maybe more coffee will hep this morning!!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    50,185

    Re: Nested If Statement - ISNA issue

    This is probably because your 1st vlookup cannot find what you are looking for. Wrap the entire thing in ISERROR()
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    20,024

    Re: Nested If Statement - ISNA issue

    Try it like this:

    =IF(ISNA(VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)),"error message", your_exisiting_formula )

    Don't forget the bracket at the end.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    02-10-2012
    Location
    Denver
    MS-Off Ver
    Excel 365
    Posts
    21

    Re: Nested If Statement - ISNA issue

    I'm writing it like so :=IF(ISNA(VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)<IN!$B$2,VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)+365,VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)),"",VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)<IN!$B$2,VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)+365,VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE))

    However, it's not liking the +365 which is part of my original If statement so.... issue in the head.

  5. #5
    Registered User
    Join Date
    02-10-2012
    Location
    Denver
    MS-Off Ver
    Excel 365
    Posts
    21

    Re: Nested If Statement - ISNA issue

    FD, I get a return of FALSE when I do this.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    20,024

    Re: Nested If Statement - ISNA issue

    Quote Originally Posted by Bearack View Post
    I'm writing it like so ...
    That is not what I suggested. Try it like this:

    =IF(ISNA(VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)),"error message", IF(VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)<IN!$B$2,VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)+365,VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)))

    Change "error message" for what you want to see if there is no exact match.

    Hope this helps.

    Pete

  7. #7
    Registered User
    Join Date
    02-10-2012
    Location
    Denver
    MS-Off Ver
    Excel 365
    Posts
    21

    Re: Nested If Statement - ISNA issue

    Quote Originally Posted by Pete_UK View Post
    That is not what I suggested. Try it like this:

    =IF(ISNA(VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)),"error message", IF(VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)<IN!$B$2,VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)+365,VLOOKUP(A4,'MW Schedule'!P:AQ,28,FALSE)))

    Change "error message" for what you want to see if there is no exact match.


    Hope this helps.

    Pete
    Nailed it, thanks you... I see my error in not continueing my IF statement on the secodn half of the ISNA chain. Thanks a mint!

+ 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] Nested IF Statement Issue
    By mbhc77 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2013, 03:46 PM
  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. [SOLVED] Issue with nested IF statement
    By Sc0tt1e in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-13-2013, 06:44 AM
  5. [SOLVED] Nested IF Statement issue
    By jsouthgate in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-05-2012, 04:49 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