Set one group for cavalry and another for ranged units. Pick them with the mouse once, then return to either with a number key. The game can be played with the mouse alone, so learn the shortcuts when you reach a point where selecting the same units again is slowing you down.