lday75,
Instead of using worksheetfunctions to get see if there is a string within a string, try using the VBA method InStr:
Sub FlagVends()
Sheets("Product Receipt").Activate
Dim r As Range, rCell As Range
Dim Looper
Dim FlgM As String, FlgC As String, FlgF As String
Set r = Range("A3:AA3")
For Each rCell In r
FlgM = "0"
FlgC = "0"
FlgF = "0"
If InStr(1, rCell.Text, "by Met", vbTextCompare) > 0 _
Or InStr(1, rCell.Text, "by MTR", vbTextCompare) > 0 Then FlgM = "1"
If InStr(1, rCell.Text, "by Com", vbTextCompare) > 0 Then FlgC = "1"
If InStr(1, rCell.Text, "by Foc", vbTextCompare) > 0 Then FlgF = "1"
MsgBox rCell.Address & ": " & rCell.Text & Chr(10) & _
"flgM: " & FlgM & Chr(10) & _
"flgC: " & FlgC & Chr(10) & _
"flgF: " & FlgF
Next rCell
End Sub
Bookmarks