Yes, just do a break down of what is common to each group (i.e. something that is applied to all)

Then do
If InGroup('group1) FunctionA() EndIf
If InGroup('group2) FunctionB() EndIf
If InGroup('group3) FunctionC() EndIf

Where functiona A,B,C have different setting, or just make it part of the Select Case without a function but using a function allows you to more easily say who and when it's ran.

Then also add in the IPAddress check as part of it too.