Interpretation of excited states using charge-transfer numbers