+ Reply to Thread
Results 1 to 5 of 5

Returning most appropriate value from a list

  1. #1
    Registered User
    Join Date
    10-20-2021
    Location
    Canada
    MS-Off Ver
    Microsoft Excel for Office 365 MSO - desktop version
    Posts
    16

    Returning most appropriate value from a list

    I am trying to populate columns C and D (main and secondary) by extracting the most appropriate value from its corresponding row in column B. Column B contains lots of values separated by commas. I am trying to see is it possible for example in C2 (sheet1) to look at the list located at sheet 2 column A and return the value "connector", in cell C2.
    The issue here is that if we look at for example row 3, sheet 1. The value I need returned in C3 is "Hose Flexible Connector", but with my formula I can only manage to get it to return all values in this list which are Hose, Hose Flexible, Hose Flexible Connector.
    Is it possible to just return the most appropriate match I.e. Hose Flexible Connector.

    Have tried IF(OR(Count formulas using wildcards such as *
    The closest I have gotten is by using the following formula:
    =TEXTJOIN(", ", TRUE, IF(COUNTIF(B3, "*"&Sheet2!$A$2:$A$10&"*"), Sheet2!$A$2:$A$10, ""))


    Any help would be much appreciated.

    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,641

    Re: Returning most appropriate value from a list

    Assuming:
    - If in main list, return main, if not, return Secondary, if not, blank cell
    - If duplicate, for instance:
    Hose Flexible Connector
    Hose Flexible
    Hose
    one with more length is choosen. (Hose Flexible Connector)

    Try:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Quang PT

  3. #3
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    UK
    MS-Off Ver
    365
    Posts
    689

    Re: Returning most appropriate value from a list

    Hmm, shouldn't the correct answer for 15 be Sprinkler Head instead of Sprinkler?

    And for 10, how do you get for the correct answer to be Reel?

    Have a look at the attached.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    10-20-2021
    Location
    Canada
    MS-Off Ver
    Microsoft Excel for Office 365 MSO - desktop version
    Posts
    16

    Re: Returning most appropriate value from a list

    Exactly what I was looking for, thank you very much.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,197

    Re: Returning most appropriate value from a list

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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. Replies: 8
    Last Post: 11-27-2019, 04:50 AM
  2. Returning a list
    By ksee1822 in forum Excel General
    Replies: 7
    Last Post: 03-09-2017, 10:17 AM
  3. Replies: 3
    Last Post: 04-16-2013, 01:44 PM
  4. [SOLVED] If statement from a list, returning from different list
    By shnolan in forum Excel General
    Replies: 2
    Last Post: 05-24-2012, 12:56 PM
  5. [SOLVED] Returning value from the list top
    By drakaz in forum Excel General
    Replies: 4
    Last Post: 05-02-2012, 04:16 AM
  6. Looking up a value and returning a list
    By bigken620 in forum Excel General
    Replies: 2
    Last Post: 09-09-2011, 05:05 PM
  7. [SOLVED] Returning next value from a list
    By Lucas in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-19-2005, 05:15 PM

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