+ Reply to Thread
Results 1 to 5 of 5

Nesting VLOOKUP in an IF statement

  1. #1
    Registered User
    Join Date
    07-20-2016
    Location
    Dallas TX
    MS-Off Ver
    2010
    Posts
    2

    Nesting VLOOKUP in an IF statement

    I'm trying to create a function where if a value is found in a table then it should return "Yes" and if not return "No". When I used this function it returns Yes if found but "#N/A" if not. What am I doing wrong?

    =IF(VLOOKUP(E2,A1:A178,1,FALSE)=E2, "Yes", "No")

    The value in E2 is the value I'm trying to match.

  2. #2
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: Nesting VLOOKUP in an IF statement

    =IF(ISERROR(VLOOKUP(E2,A1:A178,1,FALSE)),"No","Yes")

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Nesting VLOOKUP in an IF statement

    Or
    =IF(ISNA(MATCH(E2,A1:A178,0)),"No","Yes")

    Or
    =IF(COUNTIF(A1:A178,E2),"Yes","No")

  4. #4
    Registered User
    Join Date
    07-20-2016
    Location
    Dallas TX
    MS-Off Ver
    2010
    Posts
    2

    Re: Nesting VLOOKUP in an IF statement

    Perfect. Thanks!

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Nesting VLOOKUP in an IF statement

    You're welcome.

+ 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. [SOLVED] help nesting OR statement into COUNTIFS statement
    By HeyInKy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-18-2014, 09:31 AM
  2. [SOLVED] nesting MATCH and VLOOKUP in IF_AND statement
    By RoKo2013 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-09-2013, 10:14 PM
  3. Nesting IF Statement
    By firehousetk in forum Excel General
    Replies: 8
    Last Post: 11-28-2011, 12:22 PM
  4. Excel 2007 : Nesting IF Statement
    By anitad in forum Excel General
    Replies: 3
    Last Post: 06-29-2011, 11:43 PM
  5. If statement nesting
    By msbing916 in forum Excel General
    Replies: 4
    Last Post: 05-07-2010, 03:38 PM
  6. Nesting VLOOKUP in an IF statement.
    By lauren7 in forum Excel General
    Replies: 3
    Last Post: 01-20-2010, 05:44 PM
  7. VLOOKUP error when nesting within an IF statement
    By MichaelWatson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-02-2008, 03:39 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