+ Reply to Thread
Results 1 to 4 of 4

Can I add a third logical test to an if or vlookup formula?

  1. #1
    Registered User
    Join Date
    06-01-2011
    Location
    Mn
    MS-Off Ver
    Excel 2003
    Posts
    11

    Can I add a third logical test to an if or vlookup formula?

    I need to evaluate a least 3 logical tests in several areas of my spread sheet. I have successfully used the If statement, but want to "simplify" and use vlookup. Below is and example evaluating two tests.
    =IF(OR(D2="x", D2="y", D2= "z"),VLOOKUP(H2,Sheet2!$F$2:$G$3,2,TRUE),
    VLOOKUP(H2,Sheet2!$F$4:$G$13,2,TRUE))

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Can I add a third logical test to an if or vlookup formula?

    What's the third option?
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    06-01-2011
    Location
    Mn
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Can I add a third logical test to an if or vlookup formula?

    I guess it would look like this
    =IF(OR(OR(D2="x", D2="y", D2= "z"),VLOOKUP(H2,Sheet2!$F$2:$G$3,2,TRUE),
    (D2="a", D2="b"),VLOOKUP(H2,Sheet2!$F$4:$G$13,2,TRUE), VLOOKUP(D2,Sheet2!$F$14:$G$16,2,TRUE)

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Can I add a third logical test to an if or vlookup formula?

    I think this is what you are after:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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