The ability to form coalitions of agents is central to multiagent problem-solving. However, most multi-agent systems research still takes the view that teams are simply provided - an invalid assumption in most real-world situations. This paper describes an approach to forming coalitions of agents in robotic soccer, a domain where the dynamic nature of the environment plays a key role. We describe how agents that can learn about the abilities of others can form a coalition of the better-playing agents on the team, and show that this can be used to improve the performance of a team consisting of agents with varying skill levels. We also show that this mechanism is a useful one in a setting where agents are learning to play soccer, in order to form a coalition of agents from which to learn.