Energy transfer in collisions between excited atoms