+ Reply to Thread
Results 1 to 16 of 16

Find a word contained in a cell that matches a word in a list

  1. #1
    Registered User
    Join Date
    05-26-2014
    Posts
    8

    Find a word contained in a cell that matches a word in a list

    All,

    I am new to this forum and I need your assistance.

    I have attached an excel file (2 sheets) which explains everything about the problem.

    Could you please suggest me some formula to solve it.

    Regards
    Velu
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Find a word contained in a cell that matches a word in a list

    Hi,

    in Sheet2 Newyork is misspelled, better New york


    A possible formula in C2 (Sheet2) to be copied down

    =--(COUNTIF(Sheet1!$A$2:$A$100,"*"&A2&"*")>0)


    Hope it helps

    Edit: marketcity in A9 Sheet2 could create wrong results
    Last edited by canapone; 05-26-2014 at 04:24 AM.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    05-26-2014
    Posts
    8

    Re: Find a word contained in a cell that matches a word in a list

    Hi,

    Many thanks for your quick reply. It works very well

  4. #4
    Registered User
    Join Date
    05-26-2014
    Posts
    8

    Re: Find a word contained in a cell that matches a word in a list

    Hi,

    Need one more help.

    What if I want to display '5' instead of '0' in result.

  5. #5
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Find a word contained in a cell that matches a word in a list

    Hi,

    not sure to have understood, it's an attempt


    Please Login or Register  to view this content.
    Regards

  6. #6
    Registered User
    Join Date
    05-26-2014
    Posts
    8

    Re: Find a word contained in a cell that matches a word in a list

    Thank you once again.

    But this logic is not working at all cells.

    Regards
    Velu

  7. #7
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Find a word contained in a cell that matches a word in a list

    Hi,

    thanks for feebdack. Maybe it could help a little file and some examples of expected results.

    Regards

  8. #8
    Registered User
    Join Date
    05-26-2014
    Posts
    8

    Re: Find a word contained in a cell that matches a word in a list

    Hi,

    I have attached the same file with some wrong example.

    On the other hand is it possible to use 'keyword' functionality for the same problem..

    Regards
    Velu
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Find a word contained in a cell that matches a word in a list

    Hi,

    in the example you attached you could try


    =IF(COUNTIF(Sheet1!$A$2:$A$100,"*"&SUBSTITUTE(A2," ","*")&"*"),1,5)

    Hope that helps

  10. #10
    Registered User
    Join Date
    05-26-2014
    Posts
    8

    Re: Find a word contained in a cell that matches a word in a list

    Thank you for your outstanding work.

    As my project database is huge I would like you to tweak the formula further as per my attached example.


    In sheet 2 name if any word matches with the database then it should display the value as '1'

    Once again thank you very much..
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Find a word contained in a cell that matches a word in a list

    Hi,

    thanks for your feedback.

    I'm afraid of not being able to help you.

    If i've have understood you are looking to match any single substring in A2:A5

    In A2 "New's york" cannot match New york project.

    I hope you'll get better answers than mine.

    regards

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,877

    Re: Find a word contained in a cell that matches a word in a list

    By the way, New york is incorrect: it should be New York (both upper case).
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  13. #13
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Find a word contained in a cell that matches a word in a list

    canapone's countif formula works great for your latest example.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  14. #14
    Registered User
    Join Date
    05-26-2014
    Posts
    8

    Re: Find a word contained in a cell that matches a word in a list

    Thank you for your reply Fotis & AliGW.

    May be I should have explained it in a better way.

    In sheet 1 I have the database for important projects (100s of project).
    In Sheet 2 daily I use to make entry for different projects from different countries. In case if any of the project name in sheet 2 matches with the project database in sheet 1 means then the formula result has to be '1' else '5'

    Mostly sheet 2 project name slighly varies with the project name in sheet 1. This is the main problem. I have given some examples in my previous thread.

    Can you now suggest me some formula?

  15. #15
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Find a word contained in a cell that matches a word in a list

    I make 1 more try and ask you.

    What is that which is not working in my example sheet?

  16. #16
    Registered User
    Join Date
    05-26-2014
    Posts
    8

    Re: Find a word contained in a cell that matches a word in a list

    I have attached some examples in your file.
    Attached Files Attached Files

+ 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] Find word(s) within text string that matches a list of keywords - NOT case sensitive
    By gbm222 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2013, 02:15 AM
  2. Replies: 5
    Last Post: 10-02-2012, 10:29 AM
  3. [SOLVED] find word(s) within text string that matches a list of keywords
    By ecc34_11 in forum Excel General
    Replies: 10
    Last Post: 07-11-2012, 06:04 AM
  4. [SOLVED] find first word within text string that matches from a list of keywords
    By exclusivebiz in forum Excel General
    Replies: 5
    Last Post: 04-13-2012, 03:29 PM
  5. Replies: 6
    Last Post: 04-06-2012, 04:18 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