+ Reply to Thread
Results 1 to 4 of 4

Count words in a range

  1. #1
    Registered User
    Join Date
    08-30-2013
    Location
    Dallas TX
    MS-Off Ver
    Excel 2010
    Posts
    13

    Count words in a range

    I want to count the frequency words in a given range of cells. My target range if a list of the names of hospitals. I want to be able to identify rare words such that these rare words help me identify the hospital name I am looking for. Ideally I would like to create a separate worksheet with 2 columns: words and frequency. So for example:

    If my range has two records: "Parkland Memorial Hospital" and "Parkland Hospital Outpatient Services" I would get a worksheet with

    Parkland 2
    Memorial 1
    Hospital 2
    Outpatient 1
    Services 1

    I have played around with COUNTIF but I am having type the name I am looking for, like =COUNTIF(RANGE, "Parkland") but I am wanting to do this programatically.

    Thanks

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,056

    Re: Count words in a range

    You could use something like this:

    Please Login or Register  to view this content.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    08-30-2013
    Location
    Dallas TX
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Count words in a range

    Can't get it to work. When I DateRange to the name of my Range in the spreadsheet it generates cryptic error. I can't image why this is so hard. Oh well thanks for trying.

  4. #4
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,023

    Re: Count words in a range

    Hi Stan...upload a sample file of your exact setup, this will assist in finding your mistake...

    Rory's code above works...

    Input selected...
    Input.png

    Output on created sheet after code is run...
    Output.png
    Last edited by Sintek; 08-25-2020 at 03:55 AM.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

+ 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: 9
    Last Post: 04-01-2020, 03:29 AM
  2. match two words between two date range and count
    By Cosmin20192019 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-28-2019, 11:49 AM
  3. [SOLVED] Count rows that contain range of words until it reaches a row that is not in the range
    By JoeHayes89 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-04-2016, 12:46 PM
  4. how to count specific words in a cell range
    By 1.zer0 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 10-08-2015, 12:02 PM
  5. [SOLVED] Count the occurrences of 3 words in a range
    By tlacloche in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-20-2014, 10:54 AM
  6. Replies: 8
    Last Post: 05-14-2012, 02:44 PM
  7. [SOLVED] Count 2 (Two) specific words in a cell in a given range
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2006, 12:10 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