+ Reply to Thread
Results 1 to 11 of 11

Counting the number of times a word appears with a twist

  1. #1
    Registered User
    Join Date
    01-31-2017
    Location
    San Jose
    MS-Off Ver
    Excel 15.30 for Mac
    Posts
    9

    Post Counting the number of times a word appears with a twist

    Recently I noticed in a series of thousands comments that certain words would repeat themselves. So I now have a list of sentences in one column on different rows.
    However, the comments are in three states of validity: Yes, no, or partial.

    I want to count how many times a certain word appears in these states (cannot be case sensitive, and can be cut off so I can count the number of "shin-" instead of idividual "shiny" and "shine").

    File is attached below.


    In this case we have four furry creatures:
    Fox
    Bear
    Rabbit
    Squirrel

    They each have their comment with a validity marking and I have a table I can then check to see how often those words appear in these different validity states.

    I've been poring over excel tutorials and I am running into a wall.

    Please help?

    Thanks!!
    Attached Files Attached Files
    Last edited by laurigardner; 02-01-2017 at 12:50 AM.

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

    Re: Counting the number of times a word appears with a twist

    1. Attach a workbook. I don't want to retype your stuff for you.

    2. Explain why the expected result for fence is Yes:2, No:3, partial:4.

    3. Explain the significance of the entries below "Valid?"

    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.
    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

  3. #3
    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,063

    Re: Counting the number of times a word appears with a twist

    Deleted by GK - duplicated response
    Last edited by Glenn Kennedy; 01-31-2017 at 11:27 PM.

  4. #4
    Registered User
    Join Date
    01-31-2017
    Location
    San Jose
    MS-Off Ver
    Excel 15.30 for Mac
    Posts
    9

    Re: Counting the number of times a word appears with a twist

    Thanks very much for the response.

    1. Workbook attached to the original post now.

    2. I wish to count how often a word appears through many comments. A single comment could have the word several times. Each time the word appears, no matter where it appears in the comment, I want to count it.

    Why is this important? For example when someone is irritated they use polite terms more often than someone who is not.

    Breakdown of the example:
    Yes - Fox - Fox: Fence: 2
    No - Bear; Rabbit - Bear: Fence 2, Rabbit: Fence 1 = Fence:3
    Partial - Rabbit - Rabbit: Fence: 4

    3. In my real life case I have to work with comments taken from a digital corpus.

    I have assigned them one of three values, being either valid (yes), invalid (no) or partially valid (partial).

    When I am having to deal with comments, certain words are important for me to know as they could indicate validity.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Counting the number of times a word appears with a twist

    Not sure if this will get you started? This is a count for D4, based on the words in L...
    =(LEN($D$4)-LEN(SUBSTITUTE($D$4,L4,"")))/LEN(L4)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    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,063

    Re: Counting the number of times a word appears with a twist

    For Fox sake.... I am more confused than ever. Please take a very deep breath and explain again. Try to remember that we haven't the first clue what you are trying to do. No-ne knows your stuff better than you!!!

    Explain in baby steps, like to an intelligent 5-year old.

  7. #7
    Registered User
    Join Date
    01-31-2017
    Location
    San Jose
    MS-Off Ver
    Excel 15.30 for Mac
    Posts
    9

    Re: Counting the number of times a word appears with a twist

    Okay, let me start over:

    We are a company that make 3D models of furniture. When we submit a 3D model to the customer, they Quality Assure the model and either approve the model or place in a rework comment.

    I work with transferring information between a customer’s extranet and our internal system, specifically with the rework comments. This is lots of copy and pasting.

    However, the rework comments that they submit are influenced by the settings in their render engine.
    The render engine handles, reflectivity, lighting, colour saturation and numerous other functions. It’s ultimately a very customisable light box (It’s similar in function to what professional photographers use for taking pictures of furniture on a white background).

    However, their quality assurance people assume that what they see is what we have offered. So they may ask to make the model lighter, when in reality it’s a render engine issue (they just need to adjust the lighting).

    This causes there to be degrees of ambiguity in their comments.

    Ambiguity when transferring the rework comment to our very rigid minded non-English speaking 3D modellers leads to confusion and loss of time.

    For me to clear up the ambiguity, I read the review comment and set the rework comment in one of three states. A rework comment cannot have more than one state. The three states are: Valid, Invalid, or Partially Valid.

    What I have noticed is that there are certain words that show up more often in invalid comments. However, this is perception and I don’t have any hard data to back this up. Hence, I need to measure it.

    After reviewing 950 model rework comments yesterday, I now have a list of common words found in those rework comments.

    What I want to do is find out how commonly a word from that list will show up in one of the three categories: Valid, Invalid, Partially Valid.

    Those words sometimes repeat themselves. For example in an invalid comment:
    “Make the wood top lighter. Make the marble sides lighter.”

    In this case I want to count the invalid comment with the word lighter, twice.

    This then means that I have data to infer how often invalid comments relate to say lighting issues.

    Just for the sake of making things easier I have created a new excel sheet which deals with 3D Models and have attached it here.
    Attached Files Attached Files

  8. #8
    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,063

    Re: Counting the number of times a word appears with a twist

    That's it. Now (I think) I understand. KISS. Keep It Simple Stupid.

    You need a SUMPRODUCT formula like this: (I deleted a few empty columns so that I could see what was happening more easily, but you can add em back in).

    =SUMPRODUCT(($D$3:$D$12=G$3)*(LEN($E$3:$E$12)-(LEN(SUBSTITUTE(UPPER($E$3:$E$12),UPPER($F4),""))))/LEN($F4))
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-31-2017
    Location
    San Jose
    MS-Off Ver
    Excel 15.30 for Mac
    Posts
    9

    Re: Counting the number of times a word appears with a twist

    Thank you!!

    It works perfectly.

    I have now learned something new.

    Thanks again!

  10. #10
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Counting the number of times a word appears with a twist

    Nice! GK
    anyway, to avoice this case: slight vs light, with a slight correction:

    Please Login or Register  to view this content.
    Quang PT

  11. #11
    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,063

    Re: Counting the number of times a word appears with a twist

    Good one bebo.

    Great! I'm glad to have helped! If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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. Help with counting the number of times a certain text appears
    By buckles23 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-04-2014, 11:53 AM
  2. Counting number of times a word appears across worksheets
    By danltd in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-24-2012, 04:33 AM
  3. [SOLVED] Counting number of times unique id appears
    By djfscouse in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-26-2012, 01:06 PM
  4. Replies: 3
    Last Post: 05-14-2012, 10:22 PM
  5. Replies: 19
    Last Post: 05-26-2011, 04:15 PM
  6. Counting the number of times a word appears 'anywhere' on a page
    By Brother Laz in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-17-2006, 10:10 AM
  7. [SOLVED] [SOLVED] Counting the number of times a word appears in a worksheet
    By Jig Bhakta in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-02-2005, 11:06 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