To validate data entry and show error messages to your users in Excel, you can do a couple of things.
- Use traditional Data Validation (go to Data » Validation).
- Use event handlers in VBA.
Custom Office Programming and Automation
Here is a simple sub that deletes conditional formatting from a selection. The code does some prelim checking to see that it is actually acting on a range, and it mimics Excel's usual behavior (like a good VBA procedure should, if I may say so) by acting on the entire worksheet if you only select a single cell. However I recommend just selecting the range before you run the code.
Follow Me