Searching Text Strings for Most Occurring Words

ijhoeq

Board Regular
Joined
Jun 20, 2018
Messages
61
Hello,

I am wondering if anyone knows a formula to search for commonly used words in an excel column. I have data where one column is written text filled in by someone and I would like to search all of the columns for the most commonly used words. For example, several cells in column A contain phrases such as "leaking fluid from seal", "fluid loss", etc. So it would be helpful to see how many entries contain the word fluid. I appreciate any help!

Thanks!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
How about
Code:
Sub ijhoeq()
   Dim Ary As Variant, Sp As Variant
   Dim i As Long, j As Long
   
   With Sheets("Sheet1")
      Ary = .Range("A2", .Range("A" & Rows.Count).End(xlUp)).Value2
   End With
   With CreateObject("scripting.dictionary")
      For i = 1 To UBound(Ary)
         Sp = Split(Ary(i, 1))
         For j = 0 To UBound(Sp)
            .Item(Sp(j)) = .Item(Sp(j)) + 1
         Next j
      Next i
      Sheets("Sheet2").Range("A1").Resize(.Count, 2).Value = Application.Transpose(Array(.keys, .items))
   End With
End Sub
Change sheet names & ranges to suit.
This will list all words used & how many times.
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,638
Members
449,093
Latest member
Ahmad123098

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top