After much mucking around I am now using the code that Andy Pope posted elsewhere on this forum to count the words. I found that this script runs very quickly if the data does not have filters etc on it. (if there are filters it seems to go from 3mins to 2hrs). Consequently it is fine without progress indicators.
Sub CreateUniqueWords()
Dim rngData As Range
Dim rngCell As Range
Dim colWords As Collection
Dim vntWord As Variant
On Error Resume Next
Set colWords = New Collection
Set rngData = Range("B30:B86")
For Each rngCell In rngData.Cells
For Each vntWord In Split(Replace(Replace(Replace(rngCell.Value, """", ""), "]", ""), "[", ""), " ")
colWords.Add colWords.Count + 1, vntWord
With Cells(29 + colWords(vntWord), 3)
.Value = vntWord
.Offset(0, 1) = .Offset(0, 1) + 1
End With
Next
Next
With Range("C30", Cells(Rows.Count, 3).End(xlUp)).Resize(, 2)
.Sort .Cells(1, 2), xlDescending
End With
End Sub
The main modification I would like made to this macro is to make it only count a unique word once per row. How would this be done?
To deal with exceptions I now think the best way to deal with it would be to write a macro that looks through the output word list and cuts a row that begins with a listed exception word to a different worksheet. This should not be too hard.
Bookmarks