I keep trying to use the sleep spell in MM2 but it wont even let me choose the number 7, what am i doing wrong?
You have to pick the spell level first. So the command would be C 1 7, as three separate key presses (that's for Cast, Spell Level 1, Spell number 7). Then the game will prompt you to pick your target(s).
EDIT: Or, as PetrusOctavianus suggests, you might not know the spell yet. In MM2, you don't learn every spell on leveling up, some have to be purchased or found elsewhere.