Two methods. One is to look to the right hand side while on the stack, you will find that all the units appear in the window on the right. Pick the ones you want one at a time and select them. Second method would be to click on the stack and select each unit you want as you continue to click on the stack, rotating the units to the top.
Well there is third as well. Select the all attack button then manually select each unit in the right window you do not want to attack and select them again with the attack button.