Couple of ways to try
Option Explicit
Sub Testing()
Dim i As Long
With ActiveSheet
.Range("B2:B6").ClearContents
For i = 2 To 6
If InStr(UCase(.Cells(i, 1).Value), "DOG") > 0 Then
.Cells(i, 2) = "My pet is hungry"
ElseIf InStr(UCase(.Cells(i, 1).Value), "HAMSTER") > 0 Then
.Cells(i, 2) = "My pet is hungry"
ElseIf InStr(UCase(.Cells(i, 1).Value), "CAT") > 0 Then
.Cells(i, 2) = "My neighbors pet is hungry"
End If
Next i
End With
End Sub
Sub Testing2()
Dim i As Long, j As Long
Dim A1 As Variant, A2 As Variant
A1 = Array("DOG", "HAMSTER")
A2 = Array("CAT", "BIRD")
With ActiveSheet
.Range("B2:B6").ClearContents
For i = 2 To 6
For j = LBound(A1) To UBound(A1)
If InStr(UCase(.Cells(i, 1).Value), A1(j)) > 0 Then
.Cells(i, 2) = "My pet is hungry"
Exit For
End If
Next j
For j = LBound(A2) To UBound(A2)
If InStr(UCase(.Cells(i, 1).Value), A2(j)) > 0 Then
.Cells(i, 2) = "My neighbors pet is hungry"
Exit For
End If
Next j
Next i
End With
End Sub