+ Reply to Thread
Results 1 to 8 of 8

VLOOKUP help that is case sensitive, exact, and allows text and numbers

  1. #1
    Registered User
    Join Date
    05-07-2013
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    4

    VLOOKUP help that is case sensitive, exact, and allows text and numbers

    Hello,

    I am needing help creating a formula that will search if column A of sheet 1 values exist in sheet 2's entire column A range. If it exists, output a "Yes" in corresponding sheet 1 column B next to the searched value. Otherwise output a "No". I have searched for days trying to find the perfect formula for this. Seemed simple at first however, the difficult part is the formula must look for values that are case sensitive, exact, and allows for a mix of numbers and text in the search.

    Example:

    Sheet 1
    Column A
    Test1
    test1
    Te1st
    te1st

    Sheet 2
    Column A
    Test1abc
    ABCTest1
    Te1st
    t1est

    The desired result would output "Yes" for Te1st. "No" for the others.

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

    Re: VLOOKUP help that is case sensitive, exact, and allows text and numbers

    This will give a TRUE/FALSE result instead of Yes/No

    =ISNUMBER(LOOKUP(2,1/EXACT(A2,Sheet2!$A$2:$A$5)))

    If you must have yes/no, just add an if

    =IF(ISNUMBER(LOOKUP(2,1/EXACT(A2,Sheet2!$A$2:$A$5))),"Yes","No")

  3. #3
    Registered User
    Join Date
    05-07-2013
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: VLOOKUP help that is case sensitive, exact, and allows text and numbers

    Hello Jonmo1,

    Thanks for the quick response. The formula you provided almost got me there. Seems that it is not case sensitive when testing.

  4. #4
    Forum Contributor
    Join Date
    12-23-2003
    Posts
    179

    Re: VLOOKUP help that is case sensitive, exact, and allows text and numbers

    Try something like...

    B2, Sheet1...

    =IF(ISNUMBER(LOOKUP(9.99999999999999E+307,FIND(A2,Sheet2!$A$2:$A$6))),"Yes","No")

  5. #5
    Registered User
    Join Date
    05-07-2013
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: VLOOKUP help that is case sensitive, exact, and allows text and numbers

    Curious, what does the 9.9999999 number do in your suggestion?

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,681

    Re: VLOOKUP help that is case sensitive, exact, and allows text and numbers

    Jonmo's formula works for me - EXACT function is case-sensitive - can you give an example where it didn't work?
    Audere est facere

  7. #7
    Forum Contributor
    Join Date
    12-23-2003
    Posts
    179

    Re: VLOOKUP help that is case sensitive, exact, and allows text and numbers

    Quote Originally Posted by dafacta View Post
    Curious, what does the 9.9999999 number do in your suggestion?
    LOOKUP(9.99999999999999E+307,Reference)

    turns up the last numeric value from Reference if any. It's of significance that the look up value cannot occur in references of interest to us. This 9.99999999999999E+307 is the largest allowed positive number in Excel and for that reason is a good candidate.

    See:

    http://www.mrexcel.com/forum/excel-q...9999999-a.html
    http://www.mrexcel.com/forum/excel-q...-returned.html (post #7)

  8. #8
    Registered User
    Join Date
    05-07-2013
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: VLOOKUP help that is case sensitive, exact, and allows text and numbers

    Thanks for everyone's help. Decided to manipulate the search range data to simplify things a bit for the search. Suggestions above worked perfectly.

+ 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