I have always had better luck treating them as logic statements, rather than comparison statements. Probably just because it's easier for me to read and understand. Just some elementary examples...

 Code:
If Ingroup("groupA") And Ingroup("GroupB")
  ; in both groups
EndIf

If Ingroup("groupA") Or Ingroup("GroupB")
  ; in at least one of the groups, maybe both
EndIf

If Not Ingroup("groupA") And Not Ingroup("GroupB")
  ; not in either group
EndIf

If Not Ingroup("groupA") Or Not Ingroup("GroupB")
  ; not in one of the two groups, maybe not in either
EndIf


You can always nest them too, if it makes more sense to do so...

 Code:
If Ingroup("groupA")
   If Ingroup("GroupB")
      ; in both groups
   Else
      ; in groupA, but not groupB
   EndIf
EndIf