Group-based learning is overwhelmingly accepted as an important feature of current education practices. The success of using a group-based teaching methodology depends, to a great extent, on the quality of the allocation of students into working teams. We have modelled this problem as a vector packing problem and constructed an algorithm that combines the advantage of local search algorithms with the branch and bound methodology. The algorithm easily finds exact solutions to real life problems with about 130-150 students. The algorithm is implemented in GroupUp - a decision support tool which has been successfully used in the University of Warwick for a number of years