Once you've determined that there would be excess damage and how much damage is excess, Megatron simultaneously deals damage to the creature and to that creature's controller, then converts. The damage may be modified by replacement or prevention effects.