Hardness and excitation energy