This example has been discussed earlier also but I've now refined it to learn many more aspects of Excel like:
1. Data validation
2. Creating a macro
3. Deleting a module
4. Attaching a command button to the macro code
You will notice that the problem cannot be solved with a formula. Therefore you learn how to work with computer logic and the steps involved in coding in Excel VBA.