+ Reply to Thread
Results 1 to 4 of 4

How to inlcude another variable into the logical test of the IF function

  1. #1
    Registered User
    Join Date
    06-24-2015
    Location
    MN, USA
    MS-Off Ver
    2010
    Posts
    11

    Exclamation How to inlcude another variable into the logical test of the IF function

    Hi

    In my formula below you can see that I start my IF function with <> (not equal to) "GOPHER", but I want that now to also include <> "MOVING MINDS" How do I include them both in that logical test?

    =IFERROR(IF(M3<>"GOPHER","No",IF(Y3="NULL",VLOOKUP(VALUE(G3),'Top 100'!A:H,8,FALSE),VLOOKUP(VALUE(Y3),'Top 100'!A:H,8,FALSE))),"No")

  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,433

    Re: How to inlcude another variable into the logical test of the IF function

    Try it like this:

    IFERROR(IF(AND(M3<>"GOPHER",M3<>"MOVING MINDS"),"No",IF(Y3="NULL",VLOOKUP(VALUE(G3),'Top 100'!A:H,8,FALSE),VLOOKUP(VALUE(Y3),'Top 100'!A:H,8,FALSE))),"No")

    (Changes in red).

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    06-24-2015
    Location
    MN, USA
    MS-Off Ver
    2010
    Posts
    11

    Re: How to inlcude another variable into the logical test of the IF function

    That worked great, thank you!

  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,433

    Re: How to inlcude another variable into the logical test of the IF function

    Glad to hear it - thanks for the rep.

    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.

    Pete

+ 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. Complex IF function with 2 cells for logical test
    By mrdhukka in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-15-2015, 08:38 PM
  2. [SOLVED] IF function logical test is blank
    By 2knk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-15-2013, 11:39 PM
  3. Macro code using IF case with variable inputs for logical test condition
    By m2krishnan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2013, 10:59 PM
  4. IF function - Logical test
    By TomBP in forum Excel General
    Replies: 6
    Last Post: 04-28-2010, 06:07 AM
  5. Logical test function problem
    By VwmanTom in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-10-2008, 07:19 PM
  6. Logical test function problem
    By VwmanTom in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-09-2008, 10:58 PM
  7. Logical test as a variable in a UDF
    By Dave in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2006, 05:10 PM

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