+ Reply to Thread
Results 1 to 8 of 8

IF ( OR ( AND gives #N/A

  1. #1
    Registered User
    Join Date
    03-30-2016
    Location
    Gent, Belgium
    MS-Off Ver
    2007
    Posts
    3

    Question IF ( OR ( AND gives #N/A

    hello,

    it seemed an easy question, but I don't get the answer I expect.

    condition 1 : C1<2,5 and result of vlookup(...)="y"
    condition 2 : C1<2 and result of vlookup(...)="n"

    if condition 1 OR condition 2 -> "y"
    else -> "n"

    my formula:
    =IF(OR(AND(C86<2,5;VLOOKUP(H86;$T$5:$U$75;2;FALSE)="y");AND(C86<2;VLOOKUP(H86;$S$5:$U$75;2;FALSE)="n"));"y";"n")

    the result is #N/A.
    for my pc it should be ; and not , so this is for sure correct.

    Could anyone please help?
    Thanks!!
    Ann

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: IF ( OR ( AND gives #N/A

    A couple of possibilities...

    #N/A suggests that one of your VLOOKUP functions is at fault.

    Your 1st VLOOKUP is looking in column U of the table array for the result while the 2nd VLOOKUP is looking in column T of the table array for the result.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Contributor
    Join Date
    01-18-2013
    Location
    Prague
    MS-Off Ver
    Excel 2013
    Posts
    161

    Re: IF ( OR ( AND gives #N/A

    the problem is because you have error value in some of the vlookup formulas.

    try the below formula

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: IF ( OR ( AND gives #N/A

    You will get #N/A when the VLOOKUPs you are using are not able to find an exact match, i.e. H86 is not found in column T (first one) or column S (second one) - I suspect the S should be T in the second one, but I'm guessing without being able to see your workbook.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    03-30-2016
    Location
    Gent, Belgium
    MS-Off Ver
    2007
    Posts
    3

    Re: IF ( OR ( AND gives #N/A

    hello Tony,
    thanks a lot. What a stupid mistake!
    now everything works perfectly.
    have a nice day
    Ann

  6. #6
    Registered User
    Join Date
    03-30-2016
    Location
    Gent, Belgium
    MS-Off Ver
    2007
    Posts
    3

    Re: IF ( OR ( AND gives #N/A

    hi Pete,
    this is the first time I joined a forum and I already think it super.
    thanks a lot for your help!
    even without my workbook you could solve it :-)
    Ann

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: IF ( OR ( AND gives #N/A

    Good deal. Thanks for the feedback!

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: IF ( OR ( AND gives #N/A

    You're welcome, Ann, glad to be able to help.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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