+ Reply to Thread
Results 1 to 9 of 9

Vlookup - Partial Match

  1. #1
    Forum Contributor
    Join Date
    02-10-2007
    MS-Off Ver
    Excel 2010
    Posts
    293

    Vlookup - Partial Match

    Hello,

    Im trying to do vlookup between 2 columns, i.e. If Column C Info (Partial Match) Is Not On Column A, then Display Result In Column F (where it wasn't a partial match), Else Leave Blank


    If there is a partial match, display nothing.

    Please see attached spreadsheet.

    The formula I tried, in column I is obviously not giving desired result.
    =IF(ISNA(VLOOKUP(C2,$A$2:$A$5,1,TRUE)),"-",(VLOOKUP(C2,$A$2:$A$5,1,TRUE)))
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =IF(ISNA(VLOOKUP("*"&C2&"*",$A$2:$A$5,1,0)),"-",VLOOKUP("*"&C2&"*",$A$2:$A$5,1,0))

    or

    =IF(ISNA(MATCH("*"&C2&"*",$A$2:$A$5,0)),"-",MATCH("*"&C2&"*",$A$2:$A$5,0))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    02-10-2007
    MS-Off Ver
    Excel 2010
    Posts
    293
    thanks nbvc for your help, appreciate your time

    however, would like it to return all values in column c, which are not in column a, where column c and and column A have a partial match.

    see column f on spreadsheet, for actual desired result.

    sorry if i wasnt clear first time.

  4. #4
    Forum Contributor
    Join Date
    02-10-2007
    MS-Off Ver
    Excel 2010
    Posts
    293
    my bad thought i figured it out but not quite yet...so close..dang

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Something like:

    =IF(ISNUMBER(MATCH(C2,LEFT($A$2:$A$5,LEN(C2)),0)),"-",C2)

    confirmed with CTRL+SHIFT+ENTER not just ENTER and then copied down...

  6. #6
    Forum Contributor
    Join Date
    02-10-2007
    MS-Off Ver
    Excel 2010
    Posts
    293
    Hi NBV5,

    I uploaded new spreadsheet (please see attachment), comparing tab b to tab a, with results in tab c, cell a1, but am getting all "-"'s, using

    =IF(ISNA(VLOOKUP("*"&B!A1&"*",A!$A$2:$A$5,1,0)),"-",VLOOKUP("*"&B!A1&"*",$A$2:$A$5,1,0))

    the actual desired result is listed on tab c, which is displaying where the partial match was not found.


    Thanks in advance for any continued help you may be able to provide.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    02-10-2007
    MS-Off Ver
    Excel 2010
    Posts
    293
    ...............anyone?

  8. #8
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Hi try this formula

    Please Login or Register  to view this content.
    * Dont put curly braces...
    * Dont presss enter , instead press ctrl+shift+enter.. curly brace automatically appear... if curly brace does not appear after pressing ctrl+shift+enter then forumla will not work
    Attached Files Attached Files
    Last edited by Shijesh Kumar; 06-07-2008 at 02:16 PM.

  9. #9
    Forum Contributor
    Join Date
    02-10-2007
    MS-Off Ver
    Excel 2010
    Posts
    293
    Hi Shijesh,

    Yes it works for the most part. Thanks. I am a bit confused perhaps you can clarify...

    ok that was sample sheet i posted which in tab a had 5 rows. In actual i have about 299 rows and in tab b, i have 320 rows

    thus I modified your formula to read, i.e. =IF(ISNA(VLOOKUP(B!B2,LEFT(A!$A$2:$A$299, LEN(B!B320)),1,0)),B!B320,"-")

    but it retuns a "-" for all values, when I change it back to A!$A$2:$A$5, it returns results but naturally it wouldnt be doing a vlookup on. I noticed when I just change a value in formula, it removes the {} braces.

    anyhow, put formula with = sign first, then pressed Ctrl+Shift+Enter, and it put curly braces in.

    Question - I've never seen this functionaly of curly braces before. What do they do, - where can I find out more about them, why doesnt formula work without them

    I understand most of your formula, upto ={IF(ISNA(VLOOKUP(B!A2,

    But dont understand, LEFT(A!$A$2:$A$5, LEN(B!A2))

    I know left function has char, text

    could you perhaps explain your formula in plain english,ie.

    ie. lookup cell a2 in this array, but if its true its not there (IF(ISNA(, then put ,B!A2 otherwise put -, hence ,"-" something like that if you wouldnt mind.

    Again thanks to both of you for putting your valuable time to helping me out. Sincerely appreciate it.

+ 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 to search for partial word?
    By lnjr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-18-2008, 02:42 PM
  2. Replies: 3
    Last Post: 04-09-2008, 02:39 AM
  3. Vlookup using two columns-needs to match the first two column
    By pduubb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-01-2008, 01:21 PM
  4. Dynamic Form in Excel
    By lisa6538 in forum Excel General
    Replies: 15
    Last Post: 01-11-2007, 03:57 PM
  5. Vlookup & match function
    By QQ29 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-28-2006, 05:25 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