+ Reply to Thread
Results 1 to 4 of 4

Check if cell contains value from list and return data

  1. #1
    Registered User
    Join Date
    11-07-2017
    Location
    CANADA
    MS-Off Ver
    2010
    Posts
    44

    Check if cell contains value from list and return data

    Hi,

    Looking for help on the following.

    Sheet 1 column AL contains various messages. Sheet 2 columns A and B contain codes and descriptions.

    100 commodity missing
    101 description missing
    102 commodity incomplete
    103 description incomplete

    Can the following be done with a single formula? Check if column AL on the first sheet contains any of the codes listed on sheet 2 and display the codes and description just once in column ?

    As an example Sheet 1 lists data "100 Jargon 100 Filler 102 Random 103 Stuff". Can this be displayed as "100 commodity missing(Just once even though code 100 appears twice) 102 commodity incomplete 103 description incomplete"?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Check if cell contains value from list and return data

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    11-07-2017
    Location
    CANADA
    MS-Off Ver
    2010
    Posts
    44

    Post Re: Check if cell contains value from list and return data

    Happy New Year everyone! Hope everyone is doing well.

    I've attached a sample workbook. Column A on Sheet 1 has various messages.
    On Sheet 2 columns A and B contain codes and descriptions.

    Can the following be done, check if column A on the first sheet contains any of the codes listed on sheet 2 and display the codes and description just once in columns B/C on the first sheet?
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,583

    Re: Check if cell contains value from list and return data

    Since You are not having TEXTJOIN function UDF is the alternative.
    Code for UDF
    Please Login or Register  to view this content.
    How to Use UDF code:
    In the developer tab click--> Visual Basic
    VB window opens
    Insert--> Module
    Paste the code.
    Close the window.
    Now UDF is available in Function List
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 01-18-2021 at 06:20 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ 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: 2
    Last Post: 04-13-2020, 06:12 PM
  2. Replies: 5
    Last Post: 03-14-2020, 03:58 AM
  3. Modifying a VBA to check 2-3 lists and return the name of the list in a cell
    By Rjkd12 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-30-2018, 04:45 PM
  4. [SOLVED] compare list B with list A, return cell data on row where B matched A
    By master-richie in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-04-2015, 01:59 AM
  5. [SOLVED] Check a cell for a list of data, if found then print row
    By jimbobakoo in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-31-2014, 09:17 AM
  6. [SOLVED] Check to see if a cell contains text from a list then return the corresponding text
    By crousseau989 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-21-2013, 12:06 PM
  7. Replies: 11
    Last Post: 02-10-2011, 08:13 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