+ Reply to Thread
Results 1 to 4 of 4

The IFVLOOKUP Function

  1. #1
    Forum Contributor
    Join Date
    09-08-2016
    Location
    Canada
    MS-Off Ver
    MS365 Version 2401
    Posts
    130

    The IFVLOOKUP Function

    Hello Experts,

    I am trying to get a vlookup combined with an IF formula that will return a Caution or an OK. I seem to be able to get the Caution to work but not the OK if the variable is below that indicated. (see attached)

    Your help is appreciated.

    Let me know if you have any questions.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,808

    Re: The IFVLOOKUP Function

    Not sure what you are trying to test as your formula does not make sense

    =IF(VLOOKUP(G2,A2:C12,3,0)=E2>=C2,"Caution","OK") ????

    Do you mean ...

    =IF(VLOOKUP(G2,A2:C12,3,0)>=E2,"Caution","OK")

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,396

    Re: The IFVLOOKUP Function

    I recommend following your calculation through each step using the Evaluate formula tool (https://support.office.com/en-us/art...6-a70aa409b8a7 ). You should see:

    1) lookup value is 1000
    2) result of lookup is 2
    3) Evaluate boolean expressions from left to right
    3a) 2=1 is FALSE
    3b) FALSE>=2 is TRUE, because a boolean value is always "larger" than a number.
    3c) I note that this will always be the result, whether 3a returns TRUE or FALSE, so the result of this logical test will always be TRUE (unless the lookup returns an error).
    4) Return value_if_true argument and ignore value_if_false argument.

    It is not clear to me what your logical test should be testing for, but it appears to me that you have not correctly translated your intended logic into an appropriate logical expression. Correct the logical expression, and the function should work correctly.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Forum Contributor
    Join Date
    09-08-2016
    Location
    Canada
    MS-Off Ver
    MS365 Version 2401
    Posts
    130

    Re: The IFVLOOKUP Function

    Thank you both!

    Yes, I kinda figured my formula and logic didn't make sense, however John, your recommendation worked just fine.

    Thanks again both of you!

    Regards.

+ 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. How to mix an IFNA with a IFVLOOKUP
    By Weaselwithagun in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 12-14-2016, 07:38 AM
  2. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  3. Replies: 1
    Last Post: 06-10-2015, 12:56 PM
  4. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  5. IFVLOOKUP issue
    By floribunda in forum Excel General
    Replies: 4
    Last Post: 09-06-2013, 10:04 AM
  6. Replies: 1
    Last Post: 03-21-2012, 11:22 AM
  7. help with ifvlookup function.
    By jeromephoto in forum Excel General
    Replies: 2
    Last Post: 12-30-2009, 07:03 AM

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