Search text & record number of times it appears
Here's a shorter version
Sub CountCells()
Dim findText as String, found as Long
findText = "dog"
Found = application.Countif(worksheets(1).Range("A1:Z26"), _
"*" & findText & "*")
MsgBox "Found " & Found & " instances of " & findText
End sub
--
Regards,
Tom Ogilvy
wrote in message
oups.com...
That was quick. Worked like a charm. Thanks a million
regards,
Julian
|