+ Reply to Thread
Results 1 to 5 of 5

Search a range of text values for text within another range of text

Hybrid View

jhg05003 Search a range of text values... 08-02-2022, 04:21 AM
AliGW Re: Search a range of text... 08-02-2022, 04:48 AM
kvsrinivasamurthy Re: Search a range of text... 08-02-2022, 05:25 AM
jhg05003 Re: Search a range of text... 08-02-2022, 06:06 AM
AliGW Re: Search a range of text... 08-02-2022, 06:07 AM
  1. #1
    Registered User
    Join Date
    01-29-2014
    Location
    Maseru, Lesotho
    MS-Off Ver
    365
    Posts
    19

    Search a range of text values for text within another range of text

    Hello,

    I am seeking to search one column of text 'School Name" for matches in another column from another table "Village Name". Often the school name contains the village name making matching easier. Some villages have numbers but I would be happy with a result that returns any match. My ultimate goal is match up the village code with the school code data set, but I could always do that though a separate step, as below. I am assuming VBA is the answer but not good enough to write code and not finding help in other posts.

    PowerSearch.png

    I realise I will still likely need to do a manual review to confirm some the matches and not all match up perfectly but this will be a huge help.

    If you have any suggestions I would be hugely grateful.

    Thanks,
    Jonathan
    Attached Files Attached Files
    Last edited by jhg05003; 08-02-2022 at 06:08 AM. Reason: Mark solved

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2509 (Windows 11 Home 24H2 64-bit)
    Posts
    92,434

    Re: Search a range of text values for text within another range of text

    The sample workbook does NOT contain the same lookup list as shown in the screenshot.

    Are you trying to get the village name AND number automatically, or is the village name to be entered manually?

    A confusing sample spreadsheet with no manually entered results to show what you want is not much use - sorry!

    Does thes HAVE to be done with VBA?
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

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

    Re: Search a range of text values for text within another range of text

    In C2
    =IFERROR(VLOOKUP(LEFT([@[School name]],FIND(" ",[@[School name]])-1)&"*",Villages,1,0),"")
    In D2
    =IFERROR(VLOOKUP(LEFT([@[School name]],FIND(" ",[@[School name]])-1)&"*",Villages,2,0),"")
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  4. #4
    Registered User
    Join Date
    01-29-2014
    Location
    Maseru, Lesotho
    MS-Off Ver
    365
    Posts
    19

    Re: Search a range of text values for text within another range of text

    @kvsrinivasamurthy Wow thank you so much, that is great.

    Thank you also @AliGW for taking a look. No I didn't need it to be done with VBA a formula is okay I just could not find any formulas that would return the matching cell contents only True/False.

    I really appreciate both of you taking the time to assist.

    Thank you.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2509 (Windows 11 Home 24H2 64-bit)
    Posts
    92,434

    Re: Search a range of text values for text within another range of text

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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. Return specific line of text based on range of text values entered
    By robjardim in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-12-2022, 06:21 AM
  2. Search Cells for range of text / Return different text to another cell
    By earl2grey in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-12-2019, 03:52 PM
  3. Replies: 2
    Last Post: 10-02-2016, 04:18 PM
  4. Replies: 2
    Last Post: 09-07-2013, 07:50 PM
  5. search a range of cells for text and return that text
    By strucad in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-05-2013, 03:45 AM
  6. Replies: 4
    Last Post: 04-02-2012, 07:37 AM
  7. Search text string for range of text values - return match
    By crugg in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-03-2010, 09:55 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