+ Reply to Thread
Results 1 to 5 of 5

calculating number of times a word appears

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    666

    calculating number of times a word appears

    This is probably getting away from Excel functions, but I'll give it a try. In the attached workbook, each row has about 25 words (one word per column). And there are some "junk" cells with useless symbols here and there.

    Is there a way to find the most common word in each column? For example, in column C that "word" would be eur.

    Would this be more suited to a macro than a formula?

    Thanks.
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: calculating number of times a word appears

    maybe COUNTIF()

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,720

    Re: calculating number of times a word appears

    This is another way. With output in row 33 enter this formula in B33 and fill across.

    Formula: copy to clipboard
    =INDEX(B2:B32,MATCH(MAX(FREQUENCY(MATCH(B2:B32,B2:B32,0),ROW(B2:B32)-MIN(ROW(B2:B32))+1)),
    FREQUENCY(MATCH(B2:B32,B2:B32,0),ROW(B2:B32)-MIN(ROW(B2:B32))+1),0))
    Dave

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,720

    Re: calculating number of times a word appears

    Going with sandy's initial suggestion this is shorter ... also must be array entered. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    =INDEX(B2:B32,MATCH(MAX(COUNTIF(B2:B32,B2:B32)),COUNTIF(B2:B32,B2:B32),0))

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,720

    Re: calculating number of times a word appears

    Upon further review there are multiple "max" occurrences in columns M, N and U. I suspect you want all of them listed.

    This returns all of them. In B33 fill down and across until all columns start to return blanks.
    Formula: copy to clipboard
    =IFERROR(INDEX(B$2:B$32,AGGREGATE(15,6,(ROW(B$2:B$32)-MIN(ROW(B$2:B$32))+1)/
    (MAX(FREQUENCY(MATCH(B$2:B$32,B$2:B$32,0),ROW(B$2:B$32)-MIN(ROW(B$2:B$32))+1))=
    FREQUENCY(MATCH(B$2:B$32,B$2:B$32,0),ROW(B$2:B$32)-MIN(ROW(B$2:B$32))+1)),ROWS(B$33:B33))),"")

+ 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. Counting the number of times a word appears with a twist
    By laurigardner in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-02-2017, 12:37 AM
  2. Calculating the number of times a value appears based on Month and Year
    By achimbos in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-25-2015, 06:58 PM
  3. Calculating number of times individual number appears in a pivot table
    By snoopy1461 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-15-2014, 08:39 AM
  4. [SOLVED] count number of times a word appears
    By m_789 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-19-2013, 10:16 AM
  5. 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
  6. Replies: 3
    Last Post: 10-02-2007, 09:53 AM
  7. 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

Tags for this Thread

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