Another one:
Option Explicit
Sub Testme()
dim myRng as range
dim myCount as long
dim myWord as string
myWord = "Error"
'or if the error can be with other words.
myWord = "*Error*"
set myrng = worksheets("Sheet9999").range("l2:l1250")
mycount = application.countif(myrng, myWord)
if mycount = 0 then
'do nothing ' or msgbox "not found"
else
msgbox myWord & " was found " & mycount & " times."
end if
end sub
When I do this kind of stuff, I like to put the message in an adjacent cell in
nice big bold letters:
=if(countif(l2:l1250,"error")=0,"","Errors in the data!")
or
=if(countif(l2:l1250,"*error*")=0,"","Errors in the data!")