+ Reply to Thread
Results 1 to 8 of 8

Looking for a specific word or phrase and counting how often it occurs

Hybrid View

  1. #1
    Registered User
    Join Date
    11-09-2009
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    6

    Looking for a specific word or phrase and counting how often it occurs

    Hey there

    I have a problem. I've been asked to keep a track of how many unique games are mentioned in this geeklist. I've been doing it manually, but as there are going to be close to 3000 items I am wondering if someone can help me out with a formula that does this for me. When I copy the geeklist into excel, each line pastes into one cell, so I need a formula that looks for a certain word / phrases within this jungle. Is there anyone who can help me out here?


    1002. Board Game: Secret Santa added by reneald on 2014-12-09 12:45:09
    1003. Board Game: Secret Santa added by Nikiloz on 2014-12-09 12:46:12
    1004. Board Game: Prêt-à-Porter added by Brutilus on 2014-12-09 13:11:37
    1005. Board Game: Castles of Mad King Ludwig added by kristernevin on 2014-12-09 13:31:31
    1006. Board Game: Colt Express added by mgcoe on 2014-12-09 14:11:15
    1007. Board Game: The Witcher Adventure Game added by Shadow_Tracker on 2014-12-09 14:11:34
    1008. Board Game: Mice and Mystics added by erykine on 2014-12-09 14:40:21
    1009. Board Game: Mage Wars added by Der Clown on 2014-12-09 14:40:51
    1010. Family: Holidays: Christmas added by sizzling_roller on 2014-12-09 14:49:10
    1011. Board Game: Secret Santa added by LovefortheGame on 2014-12-09 15:18:44


    Thanks

    Stefán

  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 2406
    Posts
    44,662

    Re: Looking for a specific word or phrase and counting how often it occurs

    Here's one way. A helper column is used to return the game names (assuming that the : before the name and the "added" after the name are ALWAYS there. Then an array formula counts ther unique values.

    Array formulas are confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    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

  3. #3
    Registered User
    Join Date
    11-09-2009
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Looking for a specific word or phrase and counting how often it occurs

    Quote Originally Posted by Glenn Kennedy View Post
    Here's one way. A helper column is used to return the game names (assuming that the : before the name and the "added" after the name are ALWAYS there. Then an array formula counts ther unique values.

    Array formulas are confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Thanks mate

    I will give it a try in the morning.

    Stefán

  4. #4
    Registered User
    Join Date
    11-09-2009
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Looking for a specific word or phrase and counting how often it occurs

    Desided to try it already. There seems to be some fault in the formula or I'm doing something wrong. Probably the latter, as I'm not good enough with ExCel to know what I'm looking for there.

    Secret Santa 8
    Secret Santa 8
    Prêt-à-Porter 8
    Castles of Mad King Ludwig 7
    Colt Express 6
    The Witcher Adventure Game 5
    Mice and Mystics 4
    Mage Wars 3
    Holidays: Christmas 2
    Secret Santa 1

    These values don't fit - as every Secret Santa line should have equal values (3), and each of the other one's should be (1). I want the array formula to search cells B1:B3000.

    Stefán

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

    Re: Looking for a specific word or phrase and counting how often it occurs

    Hi. I tried to reply to this 30 mins ago, but it seems to have vanished. Your original question was "how many unique gaes are there?". There are 8, which is what my formula returned. It now seems that you may want the number of instances if each unique game (i.e. 3 Secret Santas, one pret a porter, etc).

    Please confirm EXACTLY what it is that you want Excel to return....

  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 2406
    Posts
    44,662

    Re: Looking for a specific word or phrase and counting how often it occurs

    |I have to go now, but here it is... modifed with both possibilities taken into account. Both alternative solutions make use of array formulas. I have also created a named range (CTRL-F3) called List, which refers to column B. It makes the formula significantly shorter. You may need to adjust the cell range that it refers to in your real sheet. Copy the formulas (in the green shaded cells) down as far as you need.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-09-2009
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Looking for a specific word or phrase and counting how often it occurs

    oh - I can see I wasn't clear in the OP. Sorry about that.

    I need to know how many unique games there are mentioned in the list and how many times each game is mentioned.

    Sorry about the confusion and many thanks for the help.

    Stefán

  8. #8
    Registered User
    Join Date
    11-09-2009
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Looking for a specific word or phrase and counting how often it occurs

    wow - this work just the way I want it to. Thanks so much for the help.

    Stefán

+ 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: 3
    Last Post: 09-15-2015, 03:00 AM
  2. Replies: 2
    Last Post: 01-15-2013, 02:55 AM
  3. [SOLVED] Counting of Specific Word and higlight that word
    By Kumail Rizvi in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 10-19-2012, 11:34 PM
  4. Replies: 5
    Last Post: 08-06-2012, 03:47 PM
  5. [SOLVED] Counting specific word occurences in a cell
    By KenRamoska in forum Excel General
    Replies: 3
    Last Post: 08-03-2006, 01:50 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