+ Reply to Thread
Results 1 to 10 of 10

Problems with V-Lookup with Partial Match

  1. #1
    Registered User
    Join Date
    09-30-2014
    Location
    Johns Island, South Carolina
    MS-Off Ver
    Office for Mac 2011
    Posts
    25

    Problems with V-Lookup with Partial Match

    I'm having a problem with a V-Lookup formula I'm trying to create. I have a Column of SKU's (Column A) and need the V-Lookup to search for the Partial Match in Column "I" and give the answer in Column "B" (based of the match in Column "J"). The problem is that the Data in Column A is not consistent and that I need the V-Lookup to check two columns for the answer.
    I tried something like: =VLOOKUP((RIGHT(A2,4)),$I$2:$B$43,2,1), but the problem is there is no consistency with the Column A so RIGHT...,4 doesn't work. I also experimented with =VLOOKUP(A2&"*",$I$2:$J$43,2,0) but that's doesn't give me all needed results.

    Does anyone have an idea what I'm missing to get the VLookup to work?

    Thank in advance for your help.
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Problems with V-Lookup with Partial Match

    It's not clear what you mean by "partial match". Which part of the column A values do you want to match with which part of the column I values? For example, in A33 you have SSSS-005-M700. Does that match (I26) FBA-USA-M700 or (I34) M700?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    09-30-2014
    Location
    Johns Island, South Carolina
    MS-Off Ver
    Office for Mac 2011
    Posts
    25

    Re: Problems with V-Lookup with Partial Match

    Thanks for looking into it Jeff. For the Example in A33 we are looking for M700 as the answer as the FBA-M700 is a different item type. There are often up to 4 different items types with similar SKU's (M700, FBA-M700, USA-M700, FBA-USA-M700). This is what makes it so hard for me to find out the correct formula. In 95% of the cases the item type I'm looking for is the last part of the SKU, but then again, there is no consistency with the SKU's so I can't just follow that rule. Hope this made it more clear.

    Thanks,
    Sweden12

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Problems with V-Lookup with Partial Match

    I think you have to improve the quality of the data in column A. A formula like this in B2:

    =VLOOKUP(A2,I:J,2,0)

    will give 242 errors (#N/A) out of 257 entries. You could improve that by doing this (say in C2):

    =IFERROR(VLOOKUP(A2,I:J,2,0),VLOOKUP(RIGHT(A2,4),I:J,2,0))

    but that will still give you 25 errors. A further refinement like this in D2:

    =IFERROR(VLOOKUP(A2,I:J,2,0),IFERROR(VLOOKUP(RIGHT(A2,4),I:J,2,0),VLOOKUP(RIGHT(A2,5),I:J,2,0)))

    reduces that to 9 errors.

    However, in row 17 you have this code - M785 - which doesn't exist in your list. Should it be M755 or M780 ??

    Maybe you should take this and then manually look at the errors - maybe you could deduce what the proper entries in column A should be (like in row 23 and 30-32) and manually correct them.

    Hope this helps.

    Pete

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Problems with V-Lookup with Partial Match

    Maybe this array formula:

    =IFERROR(INDEX($J:$J,SMALL(IF(IF(ISERROR(SEARCH(TRIM(RIGHT(SUBSTITUTE(A2,"-",REPT(" ",LEN(A2))),LEN(A2))),$I$2:$I$45)),FALSE,TRUE),ROW($A$2:$A$45)),1+COUNTIF($A$2:A2,A2))),"Not found")

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...

    There seems to be no match at row 17....
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Registered User
    Join Date
    09-30-2014
    Location
    Johns Island, South Carolina
    MS-Off Ver
    Office for Mac 2011
    Posts
    25

    Re: Problems with V-Lookup with Partial Match

    Thanks for your feedback Pete. I think your solution could work. Based on the results in Column D, I can work on getting the errors fixed. I will add what's causing errors and see if that does the trick. Thanks for your help on this.

    Sweden12

  7. #7
    Registered User
    Join Date
    09-30-2014
    Location
    Johns Island, South Carolina
    MS-Off Ver
    Office for Mac 2011
    Posts
    25

    Re: Problems with V-Lookup with Partial Match

    Thanks for your feedback Glen. There seems to be some minor issue with the Formula. For example the result in B8 with your formula is Triblend instead of Solar SS. The formula reports back RM100 instead of M100. Also, I tried to add some of the missing SKU's but regardless of how I change the formula and activate the Array Formula, the result will always be Not Found. Not sure what I'm doing wrong.

    Thanks,
    Sweden12

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Problems with V-Lookup with Partial Match

    Hi. Here is a far simpler approach. I haven't checked it extensively. You'll be able to do so far quicker than I could!!

    =IFERROR(LOOKUP(1000,SEARCH($I$2:$I$45,A2),$J$2:$J$45),"NOT FOUND")

    Only 5 Not Founds...
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    09-30-2014
    Location
    Johns Island, South Carolina
    MS-Off Ver
    Office for Mac 2011
    Posts
    25

    Re: Problems with V-Lookup with Partial Match

    Thanks Glenn. Your solution worked perfectly. I corrected the "Not Found" and now all works the way it should.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Problems with V-Lookup with Partial Match

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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. Partial Match Lookup
    By lemonap618 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-29-2019, 12:37 AM
  2. [SOLVED] Lookup partial values and if match return partial value from another cell
    By Renejorgensen in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-01-2017, 07:53 AM
  3. [SOLVED] Index Match with Partial Match in Lookup Array
    By AliGW in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-22-2016, 03:13 PM
  4. [SOLVED] Partial Match Lookup
    By bjnockle in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-15-2015, 02:24 AM
  5. Replies: 5
    Last Post: 02-24-2011, 11:26 AM
  6. Partial Match Lookup
    By mikesc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-09-2011, 07:52 AM
  7. [SOLVED] partial lookup/match
    By myra_deV in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-09-2006, 10: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