Just above the command window are icons of all the units in the stack. Shift click them. In the command window (at the bottom), there should be either an icon of three small circles going into a big one, or one big one going into three small ones.
If it's three small circles going into a big one, click it. It will group the troops you selected
Alternatively, if you are just attacking with that group one time only, then just select them + attack