For example:
Sub pcbpinoy()
Dim s$
s = "CD_HJ_TY_AB"
If InStr(s, "AB") Then MsgBox "Found AB"
If InStr(s, "AB") And InStr(s, "CD") Then MsgBox "Found AB and CD"
End Sub