Once you've determined how much damage is excess, Gandalf's Sanction simultaneously deals damage to the creature and to its controller. This damage may be modified by replacement or prevention effects.