I would suggest a macro approach to this one where you store a list of the previous pairings and get the macro to loop generating random matches and rejecting those which either are already in the list or are between two squads in the same team.

This is not fool proof as you might get a situation in which the only two squads remaining are eiher in the list or team mates. In this situation you would just keep rerunning the macro (or even get the macro to re-run itself) until you get a satisfactory outcome.