Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Docs spreadsheet formula for most frequent keywords

I wonder if there is a formula in Google Docs Spreadsheet which could identify and display (for example in column D) the most frequent (key)words in a spreadsheet?

Let's say that I have a column (Column B) full of tweets (see example image) and I would like to find top keywords in the column B and display them in column D. Is there a way to do that?

enter image description here

Thank you!

like image 643
Boco Avatar asked Jan 13 '13 19:01

Boco


People also ask

How do you find most repeated words in Google Sheets?

Select Lookup option from the Formula Type drop down list; Then choose Find most common value from the Choose a fromula list box; In the right Arguments input section, select a list of cells that you want to extract the most common value beside the Range.

How do you find the frequency of words in Google Docs?

Let's say that you want to see how many words within a specific paragraph, Google Docs has made it simple to access this information as well. You will start by highlighting the group of text you'd like to measure, then repeat step one and two from above by clicking on “Tools” and then selecting “Word count.”

How do you do frequency in Google Sheets?

To find the frequency of a word in a text, use the function FREQUENCY() in Google Sheets. The function takes two arguments: the text you want to analyze and the word you want to find the frequency of. The function returns the value 2, which means that the word "the" appears 2 times in the text "The Cat in the Hat".

How do you count occurrences of text in Google Sheets?

You can use the =UNIQUE() and =COUNTIF() functions to count the number of occurrences of different values in a column in Google Sheets.


1 Answers

To return the top 10 individual words in column B, with their frequency, try:

=ArrayFormula(QUERY(TRANSPOSE(SPLIT(JOIN(" ";B3:B);" ")&{"";""});"select Col1, count(Col2) group by Col1 order by count(Col2) desc limit 10 label Col1 'Word', count(Col2) 'Frequency'";0))

like image 112
AdamL Avatar answered Oct 21 '22 23:10

AdamL