+ Reply to Thread
Results 1 to 5 of 5

Using VLOOKUP only if two conditions are met

Hybrid View

  1. #1
    Registered User
    Join Date
    05-25-2012
    Location
    Charlie Burnett Rae
    MS-Off Ver
    Excel for Mac 2011
    Posts
    8

    Using VLOOKUP only if two conditions are met

    Hi,

    I'm trying to use the formula

    Formula: copy to clipboard
    =IF(AND(C4>=0.5,I4="P"), VLOOKUP(Assessments!C$2,Criteria!B$18:E$42,2,FALSE), "Fail")


    to check first whether C4's value is greater or equal to 0.5, then to check whether I4's text is 'P'. If these are both true, I want the VLOOKUP function to activate; if either one of the values is false, I want 'Fail' to be displayed.

    It's only half-working at this point - if someones receives a 'P' in column I, but doesn't have any score in column C, the VLOOKUP function still activates. Excel seems to be assuming a blank cell in column C is greater than or equal to 0.5. The cells in Column C contains a formulae, which I wonder might be the cause.

    Could anyone help? I've attached the spreadsheet, and the columns I'm referring to are in sheet 'Merge'.

    Thanks!
    Attached Files Attached Files

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

    Re: Using VLOOKUP only if two conditions are met

    You could change your formula to this in J2:

    =IF(AND(C2<>"",C2>=0.5,I2="P"), VLOOKUP(Assessments!C$2,Criteria!B$18:E$42,2,FALSE), "Fail")

    and similar for the other formulae, then copy down.

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,082

    Re: Using VLOOKUP only if two conditions are met

    Excel seems to be saying

    "">0.5

    which is weird
    Thats your problem
    Maybe change C2>0.5 to
    AND(C2<>"",C2>0.5)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Registered User
    Join Date
    05-25-2012
    Location
    Charlie Burnett Rae
    MS-Off Ver
    Excel for Mac 2011
    Posts
    8

    Re: Using VLOOKUP only if two conditions are met

    Thanks kind people! So
    Formula: copy to clipboard
    C2<>""
    means 'C2 isn't blank'? Is that right? Also, why do you think Excel was treating a blank cell as being greater or equal to 0.5?

  5. #5
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,082

    Re: Using VLOOKUP only if two conditions are met

    Yep that's right.

    In a new blank sheet in any cell enter
    "">0
    and it says TRUE ??

+ 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. vlookup with 2 conditions
    By tkrnaidu in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-13-2014, 11:55 AM
  2. [SOLVED] Vlookup - Country conditions (Multiple conditions)
    By dluhut in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-26-2013, 11:42 AM
  3. VLOOKUP & IF Conditions Together ?
    By VICTOR5 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-23-2012, 02:35 AM
  4. Vlookup using 3 conditions
    By lovinguy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-01-2012, 01:23 PM
  5. How do you do a VLookup with two conditions?
    By ryesworld in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-28-2005, 07: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