Automatically creating variables

The important thing is that it works but take a look at Keypad data entry. A beginners guide