+ Reply to Thread
Results 1 to 6 of 6

Returning the 1st. non blank value for a look up, even if lookup is only a partial match

  1. #1
    Registered User
    Join Date
    10-14-2021
    Location
    Mesquite,TX
    MS-Off Ver
    Microsoft 365
    Posts
    3

    Returning the 1st. non blank value for a look up, even if lookup is only a partial match

    Hi all,

    I'm pretty stumped and hoping someone can help. Attached a sample workbook.

    I've got two tables, Table 1 and Table 2. Both list companies and contact persons. Table 2 is missing contact persons, and I need to pull that information based on the names, which will be looked up in Table 1.

    The problem is, the names in Table 1 may have slightly different wording or spellings, so I need a match even based on a partial name match. The other main problem is, some companies listed in table 1 multiple times may have blank cells for their associated contact person- I need to return the first non blank contact person.

    I tried using a combination of Vlookup with WILD card functionality first, and then I also tried using a formula I found online to return the first non blank match


    =LOOKUP(2,1/(INDEX(($A$3:$A$12=LOOKUP VALUE)*($B$3:$B$12<>""),0)),$B$3:$B$12)

    If I could somehow combine these formulas that would solve the problem, or so I think.

    I've also been asked why I don't just clean up table 1 and use that instead of table 2, but this is a simplified example and there are other columns in Table 2 that I need, as well as the fact table 1 has a list of ALL possible companies, not just the ones I'm working with in table 2.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Returning the 1st. non blank value for a look up, even if lookup is only a partial mat

    Try in H3:

    Please Login or Register  to view this content.
    Quang PT

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,126

    Re: Returning the 1st. non blank value for a look up, even if lookup is only a partial mat

    Another option
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-14-2021
    Location
    Mesquite,TX
    MS-Off Ver
    Microsoft 365
    Posts
    3

    Re: Returning the 1st. non blank value for a look up, even if lookup is only a partial mat

    I was pretty excited when I tried this on the sample set, since it worked, but using this on my actual data set still unfortunately returned a lot of #N/A values

  5. #5
    Registered User
    Join Date
    10-14-2021
    Location
    Mesquite,TX
    MS-Off Ver
    Microsoft 365
    Posts
    3

    Re: Returning the 1st. non blank value for a look up, even if lookup is only a partial mat

    This worked on the sample data, and did work for some of my actual data, but it returned a lot of #CALC errors for some reason. Not sure how to proceed.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,126

    Re: Returning the 1st. non blank value for a look up, even if lookup is only a partial mat

    If you are getting the #calc error then there is no matching data. You can show a blank instead of the error like
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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] 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
  2. [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
  3. Replies: 0
    Last Post: 09-21-2013, 09:03 PM
  4. [SOLVED] Comparing list from two different sheets and returning partial row if No Match
    By loser420 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-23-2013, 01:56 PM
  5. Returning a value based on a cell with a partial match
    By Backroomgeeza in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-16-2013, 04:21 AM
  6. formula for cross referencing partial match and returning values from 2 columns
    By 5thgenbliss in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-14-2013, 04:11 PM
  7. Replies: 5
    Last Post: 02-24-2011, 11:26 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