+ Reply to Thread
Results 1 to 10 of 10

Search whole word in string

  1. #1
    Registered User
    Join Date
    10-18-2011
    Location
    Oxford, UK
    MS-Off Ver
    Excel 2010
    Posts
    19

    Cool Search whole word in string

    Hello All,

    I need to search whole text either in the cell or if possible within a range.
    I have two lists.

    ListA
    ---------
    Ask4 Internet Services
    Abc consulting services
    Chelsea Football Club
    Lloyds Bank


    ListB
    ---------
    Internet
    Abc
    Ask
    Lloyd



    Now I need to find the words in ListB into ListA
    So if I search for "Internet" it should give me 1st record.
    but if I search for Ask it should not give any record.

    I tried, "find", "search", "instr" but they all give me 1st record when I search for "Ask"

    Please help.

    Thanks
    Deepak
    Last edited by Deepak.sharma; 10-19-2011 at 04:47 AM. Reason: Formatting not correct

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Search whole word in string

    Assuming List A is in A1:A4 and List 2 is in F1:F4, then in G1 try:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER not just ENTER and copy down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,954

    Re: Search whole word in string

    You could use the Find Icon on your Ribbon/Menu. Control +F will open the same window.

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Search whole word in string

    See if this workbook helps.

    Select from the drop-down in B2.
    Add to the list in Column F
    Attached Files Attached Files
    Last edited by Marcol; 10-18-2011 at 09:34 AM. Reason: Added C/F to Column A using FIND()
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Registered User
    Join Date
    10-18-2011
    Location
    Oxford, UK
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Search whole word in string

    Quote Originally Posted by NBVC View Post
    Assuming List A is in A1:A4 and List 2 is in F1:F4, then in G1 try:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER not just ENTER and copy down.
    Thanks for your quick reply. Will give it a shot and reply soon...
    Thanks a billion.

    Cheers,
    Deepak

  6. #6
    Registered User
    Join Date
    10-18-2011
    Location
    Oxford, UK
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Search whole word in string

    Quote Originally Posted by Marcol View Post
    See if this workbook helps.

    Select from the drop-down in B2.
    Add to the list in Column F
    Thanks Marcol,

    It worked.

    Cheers,
    Deepak

  7. #7
    Registered User
    Join Date
    10-18-2011
    Location
    Oxford, UK
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Search whole word in string

    Quote Originally Posted by alansidman View Post
    You could use the Find Icon on your Ribbon/Menu. Control +F will open the same window.

    Alan
    Hello Alansidman,

    I have got some 10000 records in ListA and 4000 in ListB....
    Now would you like to change your suggestions ??

    Thanks,
    Deepak

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,954

    Re: Search whole word in string

    Now would you like to change your suggestions ??
    No need to. Marcol gave you a solution that works. Now give him some rep points.

    Alan

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Search whole word in string

    Quote Originally Posted by Deepak.sharma View Post
    Hello Alansidman,

    I have got some 10000 records in ListA and 4000 in ListB....
    Now would you like to change your suggestions ??

    Thanks,
    Deepak
    I detect an element of sarcasm/criticism here. I hope I'm wrong but if not please remember that all who post answers here give freely of their time and are genuinely trying to help you. They don't deserve that sort of comment.

    If you had mentioned in your first post the volumes of data then you may well have had a different response.

    Just an observation.....
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  10. #10
    Registered User
    Join Date
    10-18-2011
    Location
    Oxford, UK
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Search whole word in string

    Quote Originally Posted by Richard Buttrey View Post
    I detect an element of sarcasm/criticism here. I hope I'm wrong but if not please remember that all who post answers here give freely of their time and are genuinely trying to help you. They don't deserve that sort of comment.

    If you had mentioned in your first post the volumes of data then you may well have had a different response.

    Just an observation.....
    Hi Richard,

    Thanks for making me realize. Sorry for my comment and I apologize to the user(alansidman) for the same.

    Regards,
    Deepak

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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