+ Reply to Thread
Results 1 to 11 of 11

Search for Specific Word within workbook

  1. #1
    Registered User
    Join Date
    02-19-2024
    Location
    England
    MS-Off Ver
    2021
    Posts
    5

    Post Search for Specific Word within workbook

    Hi all, I have searched everywhere and nothing seems to work.

    For example, if I have 3 cells within my spreadsheet; 'Foot'. 'Football' and 'One Foot'

    I need to search for the word 'Foot', without it showing 'Football'. So the search needs to show both 'Foot' and 'One Foot'. I have tried many diff formulas and ideas but nothing seems to work! Any idea on what I can do?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Search for Specific Word within workbook

    Please clarify your version of Excel. Are you using 365?
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Search for Specific Word within workbook

    Quote Originally Posted by hassant26 View Post
    ... Any idea on what I can do? ...
    You haven't given us any detail of what you have tried, nor indeed how you data is laid out. Basically, you can add a space to the sought item and add a space to each value that you are looking through.

    Hope this helps.

    Pete

  4. #4
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: Search for Specific Word within workbook

    Maybe try something like

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

  5. #5
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Search for Specific Word within workbook

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

    Extra one space before & after foot


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  6. #6
    Registered User
    Join Date
    02-19-2024
    Location
    England
    MS-Off Ver
    2021
    Posts
    5

    Re: Search for Specific Word within workbook

    Yes indeed it is

  7. #7
    Registered User
    Join Date
    02-19-2024
    Location
    England
    MS-Off Ver
    2021
    Posts
    5

    Re: Search for Specific Word within workbook

    Quote Originally Posted by Pete_UK View Post
    You haven't given us any detail of what you have tried, nor indeed how you data is laid out. Basically, you can add a space to the sought item and add a space to each value that you are looking through.

    Hope this helps.

    Pete
    it's literally just an example to simplify it. The real data is a list of treatment and diagnosis codes, with a detailed description next to each code. I need to search for individual words without it including that same word within other words, eg foot and football, but it needs to include that specific word within other phrases, eg one foot. I need it so it doesn't list the number of data that is in the workbook, but actually allows me to search that specific word.

    Regarding detail of what I have tried, pretend this is a fresh question and I've tried nothing, bar the basic 'Find' and 'Match Case' and 'Match Entire Cell Contents'. The spacing thing also does not work

  8. #8
    Registered User
    Join Date
    02-19-2024
    Location
    England
    MS-Off Ver
    2021
    Posts
    5

    Re: Search for Specific Word within workbook

    Quote Originally Posted by ByteMarks View Post
    Maybe try something like

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This does work, however I need it to actually search for the specific word rather than Yes/No

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Search for Specific Word within workbook

    The yellow banner at the top of the screen gives details of how to attach a sample Excel file to one of your posts. If you do that then we might get a clearer idea of what you want to achieve - for example, are you looking for a single occurrence of the word, or for the first of many, or for all of the occurrences? Which column does the data exist in, and which cell do you use to specify the word you are looking for? So many unknowns !!

    Pete

  10. #10
    Registered User
    Join Date
    02-19-2024
    Location
    England
    MS-Off Ver
    2021
    Posts
    5

    Re: Search for Specific Word within workbook

    Quote Originally Posted by Pete_UK View Post
    The yellow banner at the top of the screen gives details of how to attach a sample Excel file to one of your posts. If you do that then we might get a clearer idea of what you want to achieve - for example, are you looking for a single occurrence of the word, or for the first of many, or for all of the occurrences? Which column does the data exist in, and which cell do you use to specify the word you are looking for? So many unknowns !!

    Pete
    Well. the information is confidential, hence the reason why I'm not attaching it in. I think I have been quite clear, but let me try give you more information. I would like all occurrences of the specific word. It exists in Column H, not sure what this information will do for you without the data. The part where you asked which cell i use to specify, not sure what you mean by this.

    All in all, all I want to know is how to search for words on its own and part of a sentence, that isn't part of another word.

  11. #11
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Search for Specific Word within workbook

    based on
    https://www.excelforum.com/excel-for...t-strings.html
    if the word foot is in E2
    =SUM(COUNTIF($H:$H,{"","","* ","* "}&$E2&{""," *"," *",""})) will give the total number in column H

    =SUM(COUNTIF(H1,{"","","* ","* "}&$E$2&{""," *"," *",""})) will give a 1 if the condition is met

    perhaps the above could be combined with a filter to return the list of codes

    as said before a sample with expected results would help

    you can make up a sample with your desired results you only need to list each permutation, such as

    "Foot"
    " Foot" next character blank or a space
    "Foot " previous character blank or a space


    and how you would want the results to display
    Last edited by davsth; 02-19-2024 at 09:21 AM.

+ 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. Search for specific Words within a sentence and return the specific word if found
    By chrishouse55 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-04-2022, 02:58 PM
  2. Replies: 5
    Last Post: 05-17-2016, 02:35 PM
  3. Replies: 2
    Last Post: 04-29-2014, 10:06 AM
  4. VBA Macro for search specific word and input specific value
    By Toton6868 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-10-2013, 07:14 AM
  5. Replies: 13
    Last Post: 08-04-2011, 09:41 AM
  6. Replies: 1
    Last Post: 01-25-2011, 10:50 PM
  7. [SOLVED] search for a specific word and copy the word and the preceeding words until a comma
    By DHANANJAY in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-31-2005, 09:10 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