I don't know if this suggestion has been made before...
Allow ranged units to attack in melee if they have no more ranged attacks left.
This could be useful for finishing off a stack when ranged units have only a few ranged attacks remaining.
Auto-translated