+ Reply to Thread
Results 1 to 3 of 3

VLOOKUP search for items with variable ending

  1. #1
    Registered User
    Join Date
    04-25-2015
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    1

    VLOOKUP search for items with variable ending

    Hi everyone

    I have the following problem. I would like to do a VLOOKUP since I have a list with parts in one file. And a list with parts and reference numbers in another list. I would like to associate the reference numbers to the parts in the first list.

    The part numbers have the following format: 1234 AAA

    Problem is: The part numbers may vary at the end. You would have ABA when the part was slightly altered. BAA would be a completetly new development of the part. Thus I would lose my match.

    Therefore, I would have to search first for the exact part number and then reduce to search for 1234 AA and if there is no match saerch for 1234 A. Of course since the can also be sveral hits for 1234 A like 1234 AAA or 1234 ABA e.g. I would have to display all hits.

    Anyone know how to do this?

    Thank you for your help!

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

    Re: VLOOKUP search for items with variable ending

    Hi there... and welcome to the Excel Forum. Please attach a sample workbook. Make sure there is enough data to demonstrate your need. Make sure your desired results are shown, mock them up manually if necessary. Remember to remove ALL confidential information first!!!

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    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

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: VLOOKUP search for items with variable ending

    Hi heinrij1 and welcome to the forum,

    Here is an example of how this can be achieved by using array formulas.

    Assuming the listed part numbers are in column D and a partial lookup value located in cell B2. The formula to retrieve matched items is in column A.

    Since your profile shows that you using Excel 2010 version or up you can take advantage of using formula with AGGREGATE function

    PHP Code: 
    =IFERROR(INDEX(D:D,AGGREGATE(15,6,ROW($D$2:$D$5)/((LEFT($D$2:$D$5,FIND(" ",$D$2:$D$5)+1)=$B$2)),ROWS(D$2:D2))),""
    or another version that will be compatible with older excel versions prior to 2010.

    PHP Code: 
    =IFERROR(INDEX(D:D,SMALL(IF(LEFT($D$2:$D$5,FIND(" ",$D$2:$D$5)+1)=$B$2,ROW($D$2:$D$5)),ROWS(D$2:D2))),""
    ***Array formula must be entered by using key combination of CTRL+SHIFT+ENTER and not just ENTER

    Row\Col
    A
    B
    C
    D
    1
    Search Result Lookup value List of Part #
    2
    1234 KJA 1234 K 1234 KJA
    3
    1234 KJB 1234 AAB
    4
    1234 ACA
    5
    1234 KJB
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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] variable reducing cost formula ending at zero.
    By brewsi in forum Excel General
    Replies: 3
    Last Post: 02-07-2015, 01:01 PM
  2. Calculate ending balance based on un-checked items in another column
    By jdhomeguy in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 01-08-2014, 07:58 AM
  3. Ending Macro - Variable Range
    By Austex_egger in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2013, 02:52 PM
  4. determine begining row,col and ending row,col of variable range
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 07-17-2011, 08:09 PM
  5. Can a VLOOKUP use two items to search
    By Natalie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-16-2006, 12:25 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