+ Reply to Thread
Results 1 to 8 of 8

Find and display certain text in a string based on a range of text.

  1. #1
    Registered User
    Join Date
    08-29-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    52

    Find and display certain text in a string based on a range of text.

    Morning,

    Hopefully someone can help me with this formula. I have a list of 30 names, and I need a formula to search a string in a cell for any name on the list and display name found in the cell. There will only be one name in the string.

    Thanks
    Dave

  2. #2
    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,780

    Re: Find and display certain text in a string based on a range of text.

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    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.

  3. #3
    Registered User
    Join Date
    08-29-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Find and display certain text in a string based on a range of text.

    Hi

    I've attached a sample of the sheet, I have column B which contains text strings. I need a formula in C3 that searches the string in B3 and if it find any names on the list then display the name in C3. I this is clear let me know if you have any questions.
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Find and display certain text in a string based on a range of text.

    In C3, copied down:

    =IFERROR(LOOKUP(1000,SEARCH(G$3:G$31,B3),G$3:G$31),"")
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    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,780

    Re: Find and display certain text in a string based on a range of text.

    Nice one, Glenn!

  6. #6
    Registered User
    Join Date
    08-29-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Find and display certain text in a string based on a range of text.

    Thanks Glenn,

    For some reason it didn't work in my master sheet, but when I copied my data to a blank sheet it works fine. Thanks for your help.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Find and display certain text in a string based on a range of text.

    Is the result that you need on the same sheet as your data? If not, you'll need to refer to the sheet name.

    So

    =IFERROR(LOOKUP(1000,SEARCH('Raw Data'!G$3:G$31,B3),'Raw Data'!G$3:G$31),"") or whatever....

    If they ARE on different sheets, we do need to know that!!

  8. #8
    Registered User
    Join Date
    08-29-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Find and display certain text in a string based on a range of text.

    No on the same sheet but this work book has a lot going on in it which I believe might be causing the issue. I've had issues with vlookup's not working properly where I had to switch to a index/match formula.

+ 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: 11
    Last Post: 05-23-2016, 07:42 AM
  2. Replies: 2
    Last Post: 08-05-2013, 07:32 PM
  3. [SOLVED] Find partial text string within another text string return original text into cell.
    By mikey42979 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-17-2013, 02:58 PM
  4. [SOLVED] Find text string in range
    By The Phil in forum Excel General
    Replies: 3
    Last Post: 12-31-2012, 07:06 PM
  5. [SOLVED] Find a text string within a range
    By mkvassh in forum Excel General
    Replies: 8
    Last Post: 10-29-2012, 05:58 AM
  6. Find Text String in Range of Cells
    By super21 in forum Excel General
    Replies: 2
    Last Post: 08-03-2012, 01:56 AM
  7. Find text in a string that matches value(s) in a range
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-15-2006, 02:35 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