+ Reply to Thread
Results 1 to 5 of 5

Does a word in a string match any words on a list on another sheet? Nope. Epic fail.

  1. #1
    Registered User
    Join Date
    03-16-2018
    Location
    Michigan
    MS-Off Ver
    13
    Posts
    2

    Does a word in a string match any words on a list on another sheet? Nope. Epic fail.

    Hello all! I have read posts and searched on the forum for an answer myself before posting. Unfortunately, I wasn't able to find the solution to the problem I have been having.

    I'm doing communications research and wanted to check if particular social media messages contain a metaphor. I took JSON data from a database where I had been storing the messages and imported it into excel and extracted the message body text out of the original string (in my case, it resides in cell C2). It stores this in cell E2.

    I have a list of metaphors on Sheet1, in column A1 which are words and phrases separated into rows. And I'm so stuck! I have been able to code extractions of words from the text, logical tests for words in the messages, and matches so far with limited knowledge. I just cannot for the life of me figure out how to check if any of the words in the message body (E2) are on the list on Sheet1. All I need is a simple binary for the result--1 for yes or a 0 for no. (Heck any accurate return would then achieve my undying gratitude).

    I can't post a link to the example, but if someone could help (or put me out of my misery) that would be fantastic.

    Here's what I have:

    C2---------------------------E2--------------------------Metaphor?
    Raw twitter JSON----------Extracted Message---------List of metaphors on Sheet1

    Is there any use of a metaphor (according to Sheet1) in the string in E2?

    I've tried:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Thanks in advance.

    Please Login or Register  to view this content.
    Last edited by underlandtongue; 03-16-2018 at 01:46 PM.

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Does a word in a string match any words on a list on another sheet? Nope. Epic fail.

    Attach a small, representative sample workbook.

    Make sure there is just enough data to demonstrate your need.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    To upload an Excel workbook, follow these steps:
    1) Click on "Go Advanced"
    2) Click on "Manage Attachments"
    3) Click on "Choose File"
    4) Choose your file and click on "Open"
    5) Click on "Upload"
    6) Click on "Close this window"

  3. #3
    Registered User
    Join Date
    03-16-2018
    Location
    Michigan
    MS-Off Ver
    13
    Posts
    2

    Re: Does a word in a string match any words on a list on another sheet? Nope. Epic fail.

    Thank you! I have uploaded a sample of the data.
    Attached Files Attached Files

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Does a word in a string match any words on a list on another sheet? Nope. Epic fail.

    Try this in F2:

    =IF(ISNA(LOOKUP(2,1/SEARCH(Sheet1!A$1:A$297,E2))),0,1)

  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: Does a word in a string match any words on a list on another sheet? Nope. Epic fail.

    Rule 08: Cross-posting Without Telling Us

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question. If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    No further help to be offered, please, until the OP has complied with this request.
    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.

+ 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: 4
    Last Post: 08-23-2017, 08:11 AM
  2. Replies: 15
    Last Post: 08-07-2017, 02:40 PM
  3. Replies: 4
    Last Post: 10-25-2016, 04:45 PM
  4. Replies: 1
    Last Post: 06-14-2016, 06:21 PM
  5. VBA Code error
    By chirilaionut in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-04-2014, 09:00 AM
  6. [SOLVED] Match functions fail for 3 words
    By shammi_Raj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-21-2013, 04:20 PM
  7. Replies: 0
    Last Post: 07-11-2012, 06:05 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