Pretty easy to do in VBA using the the LIKE operator.

You would just have to test two conditions instead of one.

Sub test() 
    Dim txt$, result As Boolean
    txt$ = ActiveCell.Value
If txt$ Like "abc*ghi" And Not txt$ Like "*def*" Then
        result = True
    Else
        result = False
    End If
MsgBox result
End Sub


If you wanted to do it in a cell formula you could probably make it work with FIND or SEARCH in conjunction with the LEFT and RIGHT functions. Or you could wrap the LIKE operator as a UDF like so...


Function TextLike(Text As String, Filter As String) As Boolean
     TextLike = Text Like Filter
End Function

Then the cell formula would be something like...

=textlike(A1,"abc*ghi")*NOT(textlike(A1,"*def*"))
...which would return a binary for true/false.